Question: Complete the Question ab class definition in Figure Q2(b) with the following Java statements: (1) Write a Java statement that declare the variable name of

 Complete the Question ab class definition in Figure Q2(b) with the

Complete the Question ab class definition in Figure Q2(b) with the following Java statements: (1) Write a Java statement that declare the variable name of type String and assign the string "Ahmad" to name. [2 marks] 11) Write Java statements that declare and initialize the named constant EXERCISE_HOURS of type double to 2.5. [2 marks) (LIL) Write a Java statement that declare the variable noot Day of type int and assign the numeric value 2 to noo Day. [2 marks) (iv) Write a Java statement that outputs the values of EXERCISE_HOURS, name and total of revision hours (using appropriate arithmetic operation) with the appropriate text. A sample output is: Hello, Almad. On Saturday and Sunday, you need to exercise 5.0 hours to reduce your weight. [4 marks)

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!