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=””><>