Question: a)Write a program named calculateNumber whose main class get two integer variables from user. Then, assign any values to the variables. Use static to pass
a)Write a program named calculateNumber whose main class get two integer variables from user. Then, assign any values to the variables. Use static to pass both variables to methods names sum() and difference(). (10 marks)
(b) Define methods sum() and difference(); they compute the sum and difference between the values of two arguments. Each method should perform the computation and display result in method. (10 marks)
(c) Add a new method named multiplication() to the calculateNumber class. The multiplication() method should compute the multiplication product of two integers. Output the return value in the calling method.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
