Question
Create a class BMI it should have a constructor that accepts weight in lbs and height in inches it should have a method called calculate
Create a class BMI
it should have a constructor that accepts weight in lbs and height in inches
it should have a method called calculate that returns the BMI
weight (lb) / (height (in) * height (in)) * 703
it should have a method called display that will display the BMI status using console.log
BMI Status
Below 18.5 Underweight
18.5 24.9 Normal or Healthy Weight
25.0 29.9 Overweight
30.0 and Above Obese
Create instances of the class and provide values that show each of the status, example:
const underweightBMI = new BMI(130, 72);
underweightBMI.display();
const normalBMI = new BMI(150, 65);
normalBMI.display();
const overBMI = new BMI(180, 70);
overBMI.display();
const obeseBMI = new BMI(300, 50);
obeseBMI.display();
**** Write in javascript
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