Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a new program called FindBMI that does the following: Asks the user for a name, age, height and weight (as strings types). Check the

Create a new program called FindBMI that does the following:

  • Asks the user for a name, age, height and weight (as strings types).
  • Check the values for bad data (like letters, non-numbers or spaces)
  • Prints out "The BMI for Joe Student is 30 Obese".
  • DO NOT CHANGE the BMI.java class. I will use the book's file to test your program.

image text in transcribed

To be methods for these data fields are provided in the class, but omitted in the UML diagram for brevity. BMI name: String -age: int The name of the person. The age of the person. The weight of the person in pounds. The height of the person in inches. -weight: double -height: double *BMI (name: String double, hejob ame: String, age: int, weight: le. height: double) name: String. weight: double. height: double) +get BMI(): double +getStatus(): String Creates a BMI object with the specified name, age, weight, and height. Creates a BMI object with the specified name, weight, height, and a default age 20. Returns the BMI. Returns the BMI status (e.g., normal, overweight, etc.). The BMT class encansulates RMLM

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions