Question 1: Explain how to use loops to process data stored in a two-dimensional array. In your explanation include a two-dimensional array declaration and initialization.
Question 2: Given a two-dimensional array declaration, describe two different methods on how the all the array elements could be initialized. For example, write the declaration for a two-dimensional array of type integer and set all elements of the array equal to a value of 0.
|
Question 3: Explain what constructors do and when they are executed. Explain the two types of constructors. Provide an example class that includes both types of constructor functions and demonstrate how an object would be instantiated using both types of constructors.
|
Question 4: Describe in detail what is contained in each of three areas of a Unified Modeling Language (UML) diagram of a class.
|
Question 5: 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 6: 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 7: 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 8: Describe what a namespace is and provide general syntax of a namespace statement.
|