Question: Part A: Write an application whose main() method holds two integer variables. Assign values to the variables. In turn, pass each value to methods named
Part A:
Write an application whose main() method holds two integer variables. Assign values to the variables. In turn, pass each value to methods named displayTwiceTheNumber(), displayNumberPlusFive(), and displayNumberSquared(). Create each method to perform the task its name implies (for example, displayTwiceTheNumber given the value 10 should display the following:
10 times 2 is 20
Part B:
Modify the NumbersDemo class to accept the values of the two integers from a user at the keyboard. Output the answers to the console.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
