Wyo C++
Ch. 15, Worksheet #1                                                                                 Name:

Answer the following as completely as necessary based on the apmatrix class.

1. What are the private member variables of the apmatrix class?

 

2. How many constructors are there in the apmatrix class?

3. What is the benefit of using the subscript operator?

 

4. How many destructors are in the apmatrix class?

5. What are the identifier(s) of the formal parameters in the resize function?

 

6. What is one danger in using the resize function?

 

7. Which member function(s) is/are allowed to access the private data of the apmatrix class?

 

8. Write a statement that declares a 2 dimensional matrix of integers named myMatrix that has 3 columns and 4 rows.

 

9. What does the identifier rhs stand for in the apmatrix class?

 

10. What does the keyword operator indicate within a class definition?

 

11. Demonstrate how the matrix, myMatrix, could be resized to have 2 columns and 2 rows.

 

12. Why is the apvector.h header file included (with #include) at the top of the apmatrix.h file? Explain thoroughly.

 

 

 

 

13. What are parallel arrays and give a realistic example of how they could used more efficiently than a multidimensional array. Explain thoroughly using the back if necessary.