Problem 1
Mark the following statements as true or false. a. The constructor of a derived class can specify a call to the constructor of the base class in the heading of the function definition. b. The constructor of a derived class can specify a call to the constructor of the base class using the name of the class. c. Suppose that \(\mathbf{x}\) and \(\mathbf{y}\) are classes, one of the member variables of \(\mathbf{x}\) is an object of type \(y,\) and both classes have constructors. The constructor of \(x\) specifies a call to the constructor of \(y\) by using the object name of type \(y\).
Problem 12
Explain the difference between overriding and overloading a member function of a base class in a derived class.
Problem 13
Suppose that class three is derived from class two and class two is derived from class one and that each class has instance variables. Suppose that an object of class three enters its scope, so the constructors of these classes will execute. Determine the order in which the constructors of these classes will execute.
Problem 17
Explain how in a private inheritance, the members of the base class are inherited by a derived class.
Problem 18
Explain how in a protected inheritance, the members of the base class are inherited by a derived class.
Problem 19
Explain how in a public inheritance, the members of the base class are inherited by a derived class.
Problem 20
Explain the difference between the private and protected members of a class.
Problem 21
Explain the difference between the protected and public members of a class.
Problem 23
Assume the declaration of Exercise \(22 .\) Suppose that class third is derived from class first using the statement: class third: protected first Determine which members of class first are private, protected, and public in class third.