Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

More Books

Students also viewed these Databases questions