CS 121: Assignment 11

Generic Types

Due: Monday, April 21, 10:00 am

1) (60 points) Turn the CircularArrayQueue class from the previous assignment into a generic class. You can choose to either use the class you wrote, or the sample solution from the course Web site.

2) (40 points) Change the CircularArrayQueue class so that it implements the interface java.lang.Iterable. Hint: implement the Iterator. remove() method by throwing UnsupportedOperationException, because it is not possible to remove an element from most positions of a queue.

Project. For the last part of the project, clean up and debug the messenger. Make sure the Gui looks nice and clean, test your messenger carefully, and fix any bugs you might find. Please sign up for one of the two days on which the projects will be presented (either Monday or Wednesday), and prepare a demonstration of your software in the classroom -- each team has a maximum of 10 minutes. Extra credit will be given for additional features in the messenger. Submit the final version of your code by Wednesday.



CS 121