Question 1: Using a personal computer as a base model, write a C++, syntactically correct class definition demonstrating composition. In the class definition include at least the three following items common to a PC: a CD drive, a hard disk drive, and a power supply. You are not required to include any constructors,destructors, or additional member functions. You are only required to list members that directly show composition and proper access attributes.
Question 2: Without considering the access attributes, list and describe which base class members may not be inherited by a derived class and provide a rationale for why this is.
|
Question 3: If a class is derived protected from a base class, explain how this affects the inheritance of all public, protected, and private members of the base class by the derived class.
|
Question 4: Describe what a namespace is and provide general syntax of a namespace statement.
|