Problem

Write the definition of a class that has the following properties: a. The name of the c...

Write the definition of a class that has the following properties:

a. The name of the class is secretType.

b. The class secretType has four member variables: name of type string, age and weight of type int, and height of type double.

c. The class secretType has the following member functions. (Make each accessor function constant.)

print—outputs the data stored in the member variables with the appropriate titles

setName—function to set the name

setAge—function to set the age

setWeight—function to set the weight

setHeight—function to set the height

getName—value-returning function to return the name

getAge—value-returning function to return the age

getWeight—value-returning function to return the weight

getHeight—value-returning function to return the height

constructor—with default parameters: The default value of name is the empty string " ", and the default values of age, weight, and height are 0.

d. Write the definition of the member functions of the class secretType, as described in Part c.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT