Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started