Question: Question number 2 Java Programming 10. When does a constructor execute? What is its purpose? Programming Challenges ngLab Visit www.myprogramminglab.com to complete many of these

 Question number 2 Java Programming 10. When does a constructor execute?

Question number 2 Java Programming

10. When does a constructor execute? What is its purpose? Programming Challenges ngLab" Visit www.myprogramminglab.com to complete many of these Programming Challenges online and get instant feedback. 1. Roman Numerals Write a program that prompts the user to enter a number within the range of 1 through 10. The program should display the Roman numeral version of that number. If the number is outside the range of 1 through 10 , the program should display an error message. 2. Magic Dates The date June 10,1960 , is special because when we write it in the following format, the month times the day equals the year: 6/10/60 Write a program that asks the user to enter a month (in numeric form), a day, and a two-digit year. The program should then determine whether the month times the day is equal to the year. If so, it should display a message saying the date is magic. Otherwise, it should display a message saying the date is not magic. 3. Body Mass Index Write a program that calculates an splays a person's body mass index (BMI). The BMI is often used to determine whethe is overweight or underweight for his or her height. A person's BMI is calculated wi lowing formula: BMI=Weighxt2 where weight is measured in pa leight is measured in inches. The program should display a message indiciting wi person has optimal weight, is underweight, or is overweight. A sedentary persor considered optimal if his or her BMI is between 18.5 and 25 . If the BMI is less he person is considered underweight. If the BM value is greater than 25 , the p e dered overweight. 4. Test Scores and Grade Write a program that has varial ree test scores. The program should ask the user to enter three test scores and t values entered to the variables. The program should display zhe ayerage of t and the letter grade that is assigned for the tes score averige. Use the grading following table

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!