Ask Question
2 September, 18:28

Assume that arithmetic is a reference to an object that has a method named add, that accepts two int arguments and returns their sum.

Two int variables, euroSales and asiaSales, have already been declared and initialized. Another int variable, eurasiaSales, has already been declared.

Write a statement that calls add to compute the sum of euroSales and asiaSales and that stores this value in eurasiaSales

+2
Answers (1)
  1. 2 September, 22:08
    0
    Following are the statements

    eurasiaSales = arithmetic. add (euroSales, asiaSales); / /calls to the add function

    Explanation:

    Following are the description of the statement.

    Declared a variable euroSales, asiaSales of "int" type. As given in the question "arithmetic" is a reference type variable that is used to call the method "add". arithmetic. add function is calling the function "add". In this function we pass the two integer values into it. Finally "eurasiaSales" is used to store the result of calling arithmetic. add (euroSales, asiaSales) function.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Assume that arithmetic is a reference to an object that has a method named add, that accepts two int arguments and returns their sum. Two ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers