Question
The BMI is measured with the following formula calculated as BMI = weight x 703 / height^2 A person's optimal BMI is between 18.5 and
The BMI is measured with the following formula calculated as BMI = weight x 703 / height^2 A person's optimal BMI is between 18.5 and 25. If the BMI is less than 18.5 the person is considered underweight. And if the BMI is greater than 25 then the person is considered overweight. create a class named BMI with the attribute name as a pointer and the weight and height as a real data type. Ask the user for the height in feet and inches inside the stream operator, and determine the height. Implement the stream operator to print an instance of the BMI class. Define the relational operators to print a message of the person's physical condition. Implement the copy constructor. Validate weight and height cannot be negative (try/catch). Show your class in the main program.
Step by Step Solution
3.39 Rating (149 Votes )
There are 3 Steps involved in it
Step: 1
BMI Class Implementation in C Heres a simple implementation of the BMI class in C include include class BMI private stdstring name double weight double heightpublic Constructor BMIstdstring n double w ...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