Question: 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

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 Alice

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!