Assignment 2 Use the instance methods getName(), getBMI, and getStatus() to return the BMI information in...
Fantastic news! We've Found the answer you've been seeking!
Question:
![image text in transcribed](https://s3.amazonaws.com/si.experts.images/answers/2024/05/6645af7c57d30_9406645af7c35061.jpg)
Transcribed Image Text:
Assignment 2 Use the instance methods getName(), getBMI, and getStatus() to return the BMI information in a BMI object Body mass index (BMI) is a measure of health based on height and weight. It can be calculated by taking your weight in kilograms and dividing it by the square of your height in meters. The interpretation of BMI for people 20 years or older is as follows: BMI BMI <18.5 Interpretation Underweight 18.5 BMI < 25.0 Normal Overweight Obese 25.0 BMI <30.0 30.0 BMI Formula for Body Mass Index(BMI) double weight Inkilograms weight KILOGRAMS_PER_POUND; double heightInMeters height double bmi weightInkilograms / METERS_PER_INCH; (heightInMeters *heightInMeters); The BMI class encapsulates BMI information. BMI The getter methods for property values are provided in the class, but omitted in the UML diagram for brevity. -name: String -age: int -weight: double -height: double +BMI (name: String, age: int, weight: double, height: double) +BMI (name: String, weight: double, height: double) +getBMI(): double +getStatus(): String Write a program that prompts the user to enter a weight in pounds and height in inches and displays the BMI. Note that one pound is 0.045359237 kilograms, and one inch is 0.0254 meters Assignment 2 Use the instance methods getName(), getBMI, and getStatus() to return the BMI information in a BMI object Body mass index (BMI) is a measure of health based on height and weight. It can be calculated by taking your weight in kilograms and dividing it by the square of your height in meters. The interpretation of BMI for people 20 years or older is as follows: BMI BMI <18.5 Interpretation Underweight 18.5 BMI < 25.0 Normal Overweight Obese 25.0 BMI <30.0 30.0 BMI Formula for Body Mass Index(BMI) double weight Inkilograms weight KILOGRAMS_PER_POUND; double heightInMeters height double bmi weightInkilograms / METERS_PER_INCH; (heightInMeters *heightInMeters); The BMI class encapsulates BMI information. BMI The getter methods for property values are provided in the class, but omitted in the UML diagram for brevity. -name: String -age: int -weight: double -height: double +BMI (name: String, age: int, weight: double, height: double) +BMI (name: String, weight: double, height: double) +getBMI(): double +getStatus(): String Write a program that prompts the user to enter a weight in pounds and height in inches and displays the BMI. Note that one pound is 0.045359237 kilograms, and one inch is 0.0254 meters
Expert Answer:
Posted Date:
Students also viewed these programming questions
-
Sherman's Jewelry has the following transactions during the year: total jewelry sales = $610,000; sales discounts = $13,000; sales returns = $36,000; sales allowances = $16,000. In addition, at the...
-
For Cost of Goods Sold to Inventory, Sales to Total Assets, and Sales to Working Capital ratios, typically the __________ the number, the better
-
Body Mass Index (BMJ) is a measure of obesity. In standard units, it is calculated by the formula BMI = 703/W/H2 where W is weight in pounds, and His height in inches. The obesity classification is:...
-
An investment at 10.47% effective annual rate compounded monthly is equal to an annual percentage rate of: A. 10.99% B. 9.57% C. 10% D. None of the above If the one-year discount factor is 0.8333,...
-
Describe a strategy for bio remediating a site that contains buried nuclear weapons that are leaking uranium. What could thwart your bioremediation efforts?
-
For each of the following cases, determine the number of years it will take for the initial deposit to grow to equal the future amount at the given interestrate. Case Initial deposit Future amount...
-
Wong, Inc., sold merchandise on account for \(\$ 1,840\), which is subject to a ten percent excise tax and a five percent sales tax. What would the entry to record this sale include? a. A debit of...
-
York Instruments completed the following transactions and events involving its machinery. 2012 Jan. 1 Paid $ 107,800 cash plus $ 6,470 in sales tax for a new machine. The machine is estimated to have...
-
Chrome File Edit View History Bookmarks People Tab Window Help Thu Jul 29 7:53 PM Question XM MHE Rea M blah-jfs x | Focus T2 Memphis X Memphis X MMM at x Big Carte X UofMon Grades - X Course HX + C...
-
You are provided with the following information about Roleen's inventory for the 3 rd quarter ended September 30, 2022. Inventory Type 1 (FIFO) (Periodic inventory control) Inventory Type 2 (FIFO)...
-
The course material this week focuses on media representations of the female body. Their focus, however, is primarily on content on traditional media forms such as television and print advertising....
-
Could you explain for the following question how to derive the first derivative for absolute and relative risk aversion and how to come to a conclusion on that answer whether it be increasing,...
-
On January lst , 2 0 1 8 , Company A issues a 5 - year, 7 % coupon bond with a $ 1 0 , 0 0 0 face value at $ 8 , 4 9 0 . Coupon payment in first year? On January Ist, 2 0 1 9 , a company issues a 5 -...
-
What is credibility and How does a speaker's credibility influence the audience? As a speaker, what can you do to enhance your credibility?
-
Essay on the movie gone girl .. develop a plan for each of the main characters to improve her or his listening behavior and mention at least three effective or ineffective uses of presentation aids...
-
Accounting Need help on Chandler Corp Case Study.CHANDLER CORP. DATA SHEET Exhibit 1 Resource Design/Drafting Engineering Fabrication Powder coating Scheduling General factor3a) Compute the unit...
-
Refer to the data in QS 10-1. Based on financial considerations alone, should Helix accept this order at the special price? Explain.
-
What factors are considered in preparing a sales budget schedule?
-
Will net income increase or decrease if the percentage change in expenses is less than the percentage change in net sales? Explain.
-
What accounts are affected, and how, when LampLight receives cash for preferred stock sold at par value?
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App