Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write the cod in C# please Exercise 5.2-5: Body Mass Index (BMI) is a number ca lculated from a person's weight and height, which ides
write the cod in C# please
Exercise 5.2-5: Body Mass Index (BMI) is a number ca lculated from a person's weight and height, which ides a reliable of bod y fatness for most people and is used to screen for weight categories that may lead to health problems. The formula universally used is shown below BMI 703 x weight (lb) height (in) In this project, 1. Create a class named BMI, which contains two private data members: weight and height, and one public data member BMImeasure. All the data members are of the data type double. The class shall provide two constructors. 2. The default constructor initializes data members weight and height to be 1'. a. An overloaded constructor receives two parameters inweight and inheight. b. c. The constructors shall calculate and store the BMI measure using the member function 3. The class BMI shall provide a private member function calculateBMIO, which calculates the BMI using 4. The class shall provide a public member function set values(double, double) to receive and set the calculateBMIO, specified below. the above formula and stores the result. values for weight and height. This function shall calculate the BMlmeasure using the member function calculateBMIO A print function shall be added to the class for printing out the BMImeasure. The main driver shall create two BMI objects: Eric and Alice 5. 6. a. Eric is created using the default constructor and the set values function to give the data. b. Alice is created using the overloaded constructor. 7. The main driver shall print out the BMI measures for both Eric and AliceStep 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