Skip to main content.

Monday, March 27, 2006
Due: Friday, March 31, 2006 - 10:00PM

Programming Exercises

(To get full credit for this exercise, complete 60 points worth of the exercises. You may complete more for extra credit, but the solutions must work correctly.)

[15 points] Exercise P18.1 (page 695) in the textbook. Define a class called Sentence and a method called reverse.

[15 points] Exercise P18.3 in the textbook. Add a method called reverseIter to the Sentence class which uses an explicit loop structure to perform the task. Define a tester class with a main method to test and make sure both methods work correctly.

[15 points] Exercise P18.6 (page 695).

[15 points] Exercise P18.7 (page 696).

[30 points] Exercise P18.13 (page 698) - the Towers of Hanoi puzzle.

What to submit

Your completed source code files should be turned into the proper submit folder (submit10) by the deadline.