Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need this in c++ and some comments please.. thank you.. Lab #2 Exploring Classes Write a definition of a class that has the following

I need this in c++ and some comments please.. thank you.. image text in transcribed
Lab #2 Exploring Classes Write a definition of a class that has the following properties. 1. The name of the class is secretType. 2. (Private) - The class secretType has four member variable: name (a string), age and weight (int), height (double) 3. (Public) - The class secret Type has the following member functions: (Make the - accessor functions const) a. print-outputs the data in the member variables in a nice format b. constructor - that sets the name, age, weight and height c. getName - value returning function returns the name d. getAge - value returning function returns the height e. getWeight - value returning function returns the weight f. weightStatus - value returning function that returns a string according to the following chart taken from: http://www.whathealth.com/bmi/formula.html You can find the formula for BMI (body mass index) at that same site): BMI Below 18.5 18.5 -24.9 25 - 29.9 30 & Above Weight Status Underweight Normal Overweight Obese 4. Write definitions of all the member functions of class secretType. 5. Complete the program and capture the output of 3 runs in a word document

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

More Books

Students also viewed these Databases questions