Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assume the availability of a class named Arithmetic that provides a static metho

ID: 3910793 • Letter: A

Question

Assume the availability of a class named Arithmetic that provides a static method, 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. 1 Arithmetic.add); 2 eurasiaSales enroSales+ asiaSales; 56 characters 5000 maximum Previous Submissions Clear Submit Code Analysis: Compiler Error(s) Remarks and Hints: Unexpected identifiers: enroSales You have to use the euroSales variable. You almost certainly should be using: , (comma), eurosales We think you might want to consider using:+

Explanation / Answer

//variables declared nad initialized are : euroSales, asiaSales
//variable declared: eurasiaSales
//now
//creating object of Arithmetic class
Arithmetic a = new Arithmetic();
//now calling add method by passing parameters euroSales, asiaSales and assigning result to variable eurasiaSales
eurasiaSales = a.add(euroSales, asiaSales);//computes sum of euroSales, asiaSales and stores result in eurasiaSales

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote