The classes smart

Assume the definitions of the classes smart and superSmart as given in Exercise 14.  Suppose that the following statements are in a user program (client code):

smart smartObject;

superSmart superSmartObject;

Mark the following statements as valid or invalid. If a statement is invalid, explain why. (2, 3, 4)

a. int smart::sum()

    return x + y + z;

b. smartObject.secret();

 superSmartObject.z = 0;

c. void superSmart::set(int a, int b, int c)

    smart::set(a, b);

    z=c;

 d. Assume that the following statement is in a user program. smart.print();

e. Assume that the following statement is in a user program.

cout < supersmart.sum()=””>< supersmart.z=””><>

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