Computer Science 252

Problem Solving with Java

Spring 2014, The College of Saint Rose

Agenda

- Announcements
- Lab 7: Final Project implementation phase continues
- Exam 2 score improvement problets: complete by today
- Lab 8: Terminal Draw please complete demos and submit printouts soon
- First look ahead to final exam
- review time: Monday, May 5, 8:30 PM
- exam: Wednesday, May 7, 10:45-1:15
- more details next week

- Lecture 23 assignment recap
- Matrices
- Strings and Characters
- "Evil" Hangman
**In-class Exercise 24**- (20 lecture assignment points) due before the start of our next class.Your task is to add some functionality to the Matrix2D example and write code to test it in the

`main`method there. The functionality you are to add:- A method
`max`that returns the largest number in the matrix (5 points) - A destructive method, that is, a method that modifies the
matrix on which it is called, named
`scale`that multiplies each entry in the matrix by a number (5 points) - A non-destructive method, that is, one that does not change
the matrix on which it is called, named
`multiply`that works much like`add`but computes the matrix-matrix multiplication result. If you don't remember how to multiply matrices, see the "Matrix Product" section of the Wikipedia entry to Matrix multiplication. (10 points)

- A method

Due at the start of class, Tuesday, April 29.

Please submit answers to these questions in Submission Box under "LA24" or in hard copy by the start of our next class. We will discuss these questions at the start of class, so no late submissions are accepted. Please be sure that your name is clearly indicated in all submissions.

- BDM Exercise 14.9.3, p. 399-401. (4 points)
- BDM Exercise 14.10.1, p. 402-403. (6 points)

Examples