Private members

Assume the definition of class houseType as given in Exercise 11. Answer the following questions. (1, 2, 3, 5, 7)

a. Write the definition of the member function set so that private members are set according to the parameters.

b. Write the definition of the member function print that prints the values of the data members.

c. Write the definition of the constructor of the class houseType so that the private member variables are initialized to according to the parameters.

d. Write a C++ statement that prints the value of the object newHouse.

e. Write a C++ statement that declares an object house of type newHouse, and initializes the member variables of house to “Ranch”, 3, 2, 2,  2005, 1300, 185000, and 3600.0, respectively.

f. Which function members are accessors and which are mutators?

WhatsApp
Hello! Need help with your assignments?

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

🛡️ Worried About Plagiarism? Run a Free Turnitin Check Today!
Get peace of mind with a 100% AI-Free Report and expert editing assistance.

X