Assignment 8: Collections and Streams Practice

Objective: To get experience using collections

Due: Before class on Wednesday

Type Parameter

Modify your MediaItem class such that it implements the Comparable interface with the Class type. (Eclipse will guide you with how to fix the warning.)

If you did not complete the previous MediaItem assignments, there is some "starter code" in /home/courses/cs209/handouts/Media or you can grab the tar file /home/courses/cs209/handouts/media.jar

Notes

Using Collections

We discussed several different types of collections. In your driver program for the MediaItems, use an appropriate collection to store your items instead of an array. Before making your choice, consider how easily you can implement the same functionality as in the last assignment, e.g., easily you can store items, retrieve items, and sort items.

This part is underspecified on purpose. In comments in your driver program, defend your choice of collection.

User Interaction

We've now dealt with handling user input. Modify your driver program so that it provides a menu for the user to manipulate the library. Allow the user to

Here is some code to help you get started.

Turnin

Copy your code and execution scores files into an assign8 directory in your turnin directory.

Grading (100 pts)

You will be evaluated based on the following criteria: