Question: I would like this in one whole program. Not two programs. Write an application whose main() method holds two integer variables. Assign values to the
I would like this in one whole program. Not two programs.
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 10should display the following:
10 times 2 is 20
Then 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
