1. The class constructor DateType() is a constructor operation. Set and Increment are transformers. Month, Day, Year, Print, and ComparedTo are observers.
Chapter 16
Exam Preparation Exercises
2. False
4. Class Abc:
a. The private data members are alpha and beta.
b. Functions DoThis and DoThat can reference alpha and beta
c. Functions DoThis and DoThat can invoke each other directly.
d. Clients can invoke DoThis.
Class Xyz:
a. The private data members are alpha, beta, and gamma.
b. Function Trylt can reference only gamma directly.
c. Function Trylt can invoke the parent class's DoThis function directly. The syntax for the function call is Abc::DoThis().
d. Clients can invoke DoThis and Trylt.
7. a. Member slicing occurs, and static binding is used. The output is
x
y
b. Member slicing does not occur, and dynamic binding is used. The output is
x
yz
c. Member slicing does not occur, but static binding is used. The output is