Question: 2. (Exercise.java) Write Java statements to complete the following program. public class Exercise public static void main (String[] args) //variable declaration //executable statements Write a

 2. (Exercise.java) Write Java statements to complete the following program. public
class Exercise public static void main (String[] args) //variable declaration //executable statements

2. (Exercise.java) Write Java statements to complete the following program. public class Exercise public static void main (String[] args) //variable declaration //executable statements Write a Java statement that imports the class scanner Wnte ajavastatement that declares fo inputting data from the standard input device Write Java statements that declare and initialize the following named constants: SECRET of sype int initialized to 11; RATE of type double initialized to 12.50 console to be a Scanner object Write Java statements that declare the following variables: numl, num2, and newNum of type int; name of oype string: hoursWorked and vages of type double. Write Java statements that prompt the user to input two integers and store the first number into numl and the second number into num2. Write a Java statementfs) that outputs the value of numl and num2. indicating which is numi and which is num2. For example, if numl is 8 and num2 is 5, then the output is: The value of numi 8 and the value of num2 s. e Write a Java statement that multiplies that value of numi by 2, adds the value of nun2 to it, and then stores the result in nelun. Then write a Java statement that outputs the value of nevN . Write a Java statement that updates the value of nevliun by adding the value of the mained constant SECRETThen, write a Java statement char outputs the value of nevlun with an appropriate mesage. Write Java statements that prompt the user to entet a person's last name and then store the last name into the variable nane. L Write Java statements that prompt the user to enter a decimal number between 0 and 70 and then store the number entered into hoursHorked Write a Java statement that multiplies that value of the named comtant RATE with the value of hoursworked and stores the result into the variable wages. k

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!