Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

More Books

Students also viewed these Databases questions

Question

Select suitable tools to analyze service problems.

Answered: 1 week ago