The number in parentheses at the end of an exercise refers to the learning objective listed at the beginning of the chapter.
Write the definition of a class that has the following properties: (1, 2, 3, 5)
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.
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.