a) Create a class named Numbers whose Main( ) method holds two integer variables
ID: 3658365 • Letter: A
Question
a) Create a class named Numbers whose Main( ) method holds two integer variables. Assign values to the variables. Within the class, create two methods, Sum( ) and Difference( ), that compute the sum of and difference between the values of the two variables, respectively. Each method should perform the computation and display the results. In turn, call each of the two methods from Main( ), passing the values of the two integer variables. b) Add a method named Product( ) to the Numbers class. This method should compute the multiplication product of two integers, but not display the answer. Instead, it should return the answer to the calling Main( ) method, which displays the answer.Explanation / Answer
the function public static int product(int valueOne,int valueTwo) { int product=valueOne*valueTwo; return product; } now in your main method call like this System.out.println(product(valueOne,va
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.