Ask 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 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

+5
Answers (1)
  1. 28 July, 16: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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers