Question: Question 1: Write a java program that has the following methods: A method called bodyMass that takes as parameter a double value called weight. The

 Question 1: Write a java program that has the following methods:

Question 1: Write a java program that has the following methods: A method called bodyMass that takes as parameter a double value called weight. The method should check the weight and return a string describing the body mass as following: "Overweight" is for weight greater than 90 kg "Fat" is for weight between 70 and 90 both included "Ideal" is for weight between 55 and 69 both included "Thin" is for weight between 45 and 54 both included "Underweight" is for weight less than 45 . The main method asks the user to enter the name and weight of 6 ladies (using a loop) and prints their body mass description by invoking the method body Mass as per the following sample run. Page 1 of 2 CSCI250L Fall 2021 - 2022 Sample Input and Output: Enter the name and the weight of lady 1: Rola 60 Rola is Ideal Enter the name and the weight of lady 2: Petra 40 Petra is Underweight Enter the name and the weight of lady 3 : Samira 48 Samira is Thin Enter the name and the weight of lady 4 : Rana 100 Rana is overweight Enter the name and the weight of lady 5 : Tia 58 Tia is Ideal Enter the name and the weight of lady 6 : Lamar 80 Lamar is Fat

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!