KRHS Internet Lesson

Teacher Name:Mr. Rung                          Date of Lesson: April

Course Name: C++                    Lesson Name: Chap 15.2a

Student Name

Password


Objective
To complete the workbook exercises in chapter 15.


Primary Focus
Answer the questions in the first section of your workbook and fill in the answers below.

Site Links
Course Home Page

Additional Resources

Site Links


Question #1

Why is the assignment operator overloaded in the matrix class?


Question #2

What does the member function int numcols ( ) const; do?


Question #3

Write & statement to instanciate a matrix of double-precision floating-point numbers. The matrix should
be called rate-chart and should have 8 columns and 12 rows. Each element of the matrix should ini- tially have the value 0.0.


Question #4

Write a statement to assign the value 12.95 to the first element of the first column of the rate-chart matrix.


Question #5

Write the program statements necessary to display the number of rows and the number of columns in the matrix named rate-chart.


Question #6

Write a statement that will change the size of a matrix named MyMatrix to 16 rows by 32 columns,


Question #7

What are some benefits of using the matrix class over a standard two-dimensional array?