Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Java class, called Fitness to |maintain information about a persons name, age, weight and height. A name comprises a first name, a middle
Write a Java class, called Fitness to |maintain information about a persons name, age, weight and height. A name comprises a first name, a middle initial and a last name. Write a constructor for this class that initializes all attribute variables. No error checking of parameters is required for this question. In addition to the constructor, your class should implement the following three methods: firstNameIs takes a first name as a parameter and returns true if it is the same as this individuals name. bmi calculates the body mass index for this individual. The body mass index is a measure of relative weight defined as the individuals body mass (weight) divided by the square of their height with units of kg/m^2. bmiNormal returns true if the individuals BMI is in the normal range and false otherwise. A normal BMI is defined as a value between 18.5 and 25. Include brief comments where necessary, but full Javadoc comments are not required
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started