Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 ... 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

Criminal Law And Procedure

Authors: John M Scheb, John M Scheb II

6th Edition

0495095486, 9780495095484

More Books

Students also viewed these Business Writing questions