A fitness instructor wants to find out the number of students who are underweight, ideal, overweight,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A fitness instructor wants to find out the number of students who are underweight, ideal, overweight, and obese. The BMI (Body Mass Index) is a common tool for deciding whether a person has an appropriate body weight. It measures a person's weight in relation to their height. BMI is calculated as follows: BMI Less than 18.5 At least 18.5 but less than 25 At least 25 but less than 30 Over 30 BMI = (weight)/(height*height). => Category Underweight Ideal Overweight Obese Your goal is to create an application that provides the fitness instructor with the following options: 1. Input a student's name, height (meters) and weight (kilograms) for as many students as the instructor wants. 2. Search for a specific student by name. If the student's name is found, then the student's name and BMI will be displayed. Otherwise, a message is displayed indicating that the student doesn't exist. 3. Print a well formatted report listing all the students' names, BMI, the total number of students in each category and the average BMI. The application should validate all inputs such that when an invalid input is provided the user must see an error message and be re prompted. A Sample run for the application is provided at the end of this document not use System.exit, or any variant that exits the program in the middle of the program. The program should be designed to only exit once the algorithm has finished. Grading Criteria Requirement Implementation of Java Program, using efficient practices where appropriate, such as the use of constants, good variable names, no redundant code, etc. Appropriate objective-style documentation Appropriate intermediate comments Points 80 10 10 Your program must successfully compile using jGrasp. Partial credit is available. Any final program that does not compile, for any reason, will receive an automatic zero. Other IDEs often place in additional code that you are unaware of, doing too much of the work for you. You are strongly discouraged from using IDES other than jGrasp. Sample Run 1) Menu presented to the user Input Main Menu Choose A, B, C or D A. Enter Student Names B. Search C. Print Report D. Exit A Cancel OK 2)Input student information Input 3) Report Enter Student name1 Wilma Flintstone Cancel OK Input Enter the height for Student namel 1.54 Cancel OK Input Enter the weight for Student namel 56 Cancel OK 4) Searching Message ***Gym Database *** Student's name: Wilma Flintstone Student's BMI: 23.61 Student's Category: Ideal Student's name: Kim Possible Student's BMI: 18.73 Student's Category: Ideal Student's name: Fred Flintstone Student's BMI: 28.41 Student's Category: Overweight Underweight = 0 Ideal weight = 2 Overweight = 1 Obese -0 Average BMI 23.58 5)Wrong Input Input Enter Student name Fred Flintstone OK Cancel OK Input Main Menu Choose A, B, C or D A. Enter Student Names B. Search C. Print Report D. Exit Cancel OK Message Message ****** Research Results****** Student's name: Fred Flintstone Student's BMI: 28.41 Student's Category: Overweight Wrong menu option. Please try again OK OK A fitness instructor wants to find out the number of students who are underweight, ideal, overweight, and obese. The BMI (Body Mass Index) is a common tool for deciding whether a person has an appropriate body weight. It measures a person's weight in relation to their height. BMI is calculated as follows: BMI Less than 18.5 At least 18.5 but less than 25 At least 25 but less than 30 Over 30 BMI = (weight)/(height*height). => Category Underweight Ideal Overweight Obese Your goal is to create an application that provides the fitness instructor with the following options: 1. Input a student's name, height (meters) and weight (kilograms) for as many students as the instructor wants. 2. Search for a specific student by name. If the student's name is found, then the student's name and BMI will be displayed. Otherwise, a message is displayed indicating that the student doesn't exist. 3. Print a well formatted report listing all the students' names, BMI, the total number of students in each category and the average BMI. The application should validate all inputs such that when an invalid input is provided the user must see an error message and be re prompted. A Sample run for the application is provided at the end of this document not use System.exit, or any variant that exits the program in the middle of the program. The program should be designed to only exit once the algorithm has finished. Grading Criteria Requirement Implementation of Java Program, using efficient practices where appropriate, such as the use of constants, good variable names, no redundant code, etc. Appropriate objective-style documentation Appropriate intermediate comments Points 80 10 10 Your program must successfully compile using jGrasp. Partial credit is available. Any final program that does not compile, for any reason, will receive an automatic zero. Other IDEs often place in additional code that you are unaware of, doing too much of the work for you. You are strongly discouraged from using IDES other than jGrasp. Sample Run 1) Menu presented to the user Input Main Menu Choose A, B, C or D A. Enter Student Names B. Search C. Print Report D. Exit A Cancel OK 2)Input student information Input 3) Report Enter Student name1 Wilma Flintstone Cancel OK Input Enter the height for Student namel 1.54 Cancel OK Input Enter the weight for Student namel 56 Cancel OK 4) Searching Message ***Gym Database *** Student's name: Wilma Flintstone Student's BMI: 23.61 Student's Category: Ideal Student's name: Kim Possible Student's BMI: 18.73 Student's Category: Ideal Student's name: Fred Flintstone Student's BMI: 28.41 Student's Category: Overweight Underweight = 0 Ideal weight = 2 Overweight = 1 Obese -0 Average BMI 23.58 5)Wrong Input Input Enter Student name Fred Flintstone OK Cancel OK Input Main Menu Choose A, B, C or D A. Enter Student Names B. Search C. Print Report D. Exit Cancel OK Message Message ****** Research Results****** Student's name: Fred Flintstone Student's BMI: 28.41 Student's Category: Overweight Wrong menu option. Please try again OK OK
Expert Answer:
Answer rating: 100% (QA)
Answer To the create an application to allow the fitness instructor to continuously input a students name height meters and weight kilograms until the ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
Bill and Mary are married. Mega Corporation employs them both. In 2018, Mary earned $70,000 and Bill earned $135,000, in both cases W-2 wages. How much FICA tax were they required to pay for 2018?
-
Thom Hayes owns Gaz Mtropolitain preferred stock. If this preferred stock issue pays 6 l/4 percent based on a par value of $25, what is the dollar amount of the dividend for one share of Gaz...
-
Find the limit of each rational function (a) As x and (b) As x -. f(x) = x + 1 2 x + 3
-
Plaintiff grounds manager sued a manufacturer, Monsanto, alleging that herbicide use caused his non-Hodgkins lymphoma. The jury awarded the plaintiff \($39.3\) million in compensatory damages and...
-
Impairment Assume the same information as E11-16, except that Pujols intends to dispose of the equipment in the coming year. It is expected that the cost of disposal will be $20,000. (a) Prepare the...
-
Using the list method or the switch method, find the inverse function of: f(x)=6x+1-13 f1(x) =
-
During 2019, Jason and Vicki Hurting, who are married with two children and filing jointly, had the following tax information. Jason owns a cash-basis landscaping business, and Vicki works as a sales...
-
A student skates up a ramp that makes an angle 30 with the horizontal. He/she starts (as shown in the figure) at the bottom of the ramp with speed vo and wants to turn around over a semicircular path...
-
Product Name: Choco Bliss Manufacturer: twinkies Year of Discontinuance: 1980s 1.What would be the Target Market? (5 marks) 2.4 P's (10 marks) 3.SWOT & PESTEL-C (10 + 20 = 30 marks) (NO...
-
How do visionary leaders adeptly navigate the delicate balance between assertive decision-making and collaborative consensus-building to optimize organizational performance and foster sustainable...
-
There are many journals discussing communication issues. Identify any TWO recent journal articles that discuss communication issues (2018 and up). Attach the article in the forum. Then, summarize...
-
The formation and evolution of identity is influenced by various internal and external factors. Explain how your identity was formed and developed from the beginning to now. Share your experience.
-
1) Identify a Major Global Company 2) Provide a brief History of the Company and what it does. 3) Identify their top three (3) Tier 1 Suppliers - Explain what they supply, where they are located and...
-
A $49,000 loan at 9.4% compounded semiannually is to be repaid by semiannual payments of $3,700 (except for a smaller final payment). a. What will be the principal component of the sixteenth payment?...
-
Revol Industries manufactures plastic bottles for the food industry. On average, Revol pays $76 per ton for its plastics. Revol's waste-disposal company has increased its waste-disposal charge to $57...
-
The campaign manager for a political candidate claims that 55% of registered voters favor the candidate over her strongest opponent. Assuming that this claim is true, what is the probability that in...
-
For the ANOVA portion of the printout shown in Exercise 15.85, explain the exact meaning of each number in the SS and F columns. In exercise Regression Analysis The regression equation is...
-
Twenty samples have been taken from a production run. Given the following data, construct a 3-sigma p-chart and evaluate whether the process is in control. 8672858265 32 0986 3444344 278769 4333333...
-
Xenon oscillations are a phenomenon at higher levels of power where xenon-135 loss due to neutron capture is dominant. For example, in a typical large thermal environment, if Xe-135 burnup is 10...
-
Explain the plant states considered for safety analysis and the advantages of new states.
-
Explain the relative criteria that can provide relative safety in nuclear reactors.
Study smarter with the SolutionInn App