Write an application whose main method holds two integer


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.

Solution Preview :

Prepared by a verified Expert
Computer Engineering: Write an application whose main method holds two integer
Reference No:- TGS02885043

Now Priced at $10 (50% Discount)

Recommended (91%)

Rated (4.3/5)