Question: a. Create an application named NumbersDemo whose main() method holds two integer variables. Assign values to the variables. In turn, pass each value to methods
a. Create an application named NumbersDemo 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. Save the application as NumbersDemo.java.
b. Modify the NumbersDemo class to accept the values of the two integers from a user at the keyboard. Save the file as NumbersDemo2.java.
Step by Step Solution
3.40 Rating (169 Votes )
There are 3 Steps involved in it
a NumbersDemojava public class NumbersDemo public static void main String args int num1 4 num2 33 di... View full answer
Get step-by-step solutions from verified subject matter experts
