Ask Question
1 August, 01:40

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. 1 August, 02:21
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers