CS 261 Homework 1 - Movie Library

Due Thu Sep 11 at 11:59pm

Overview

This assignment will help you refresh your Java basics, and give you a chance to practice working with the Eclipse IDE. Your task is to write a set of Java classes that together manage a simple movie library, such as you might use to keep track of a personal video collection. This program will allow users to load a list of movies from a file, search through the list, add or remove items from the list, and then save the list back to a file. Users will interact with the system through the command-line, using a menu such as the one below:

Welcome to the movie library.
Select an option:
  1. List movies in library
  2. Look up a movie by title
  3. Look up movies by actor
  4. Look up highest rated film
  5. Add a movie to the library
  6. Remove a movie from the library
  7. Load a library from a file
  8. Save movie library to a file
  9. Exit system
>

This assignment should be completed individually.

Objectives

Necessary Files

You will need to download the cs261-hwk1.zip file.

This zip file contains a MovieLibraryLoader.java utility class that will let you load and save your library to a file by using the provided static methods. You should import this class into your Eclipse project (in the same manner you imported classes in Lab A). Note that you will need a new Eclipse project for this assignment--select "New > Java Project" from the File menu to create a new project (e.g., "Hwk1").

The zip file also contains movies.txt, a small example movie library you can use for testing. You should also import this file into Eclipse. However, this file is not source code--it should not go in the src folder! Instead, make sure the file is in the "top-level" directory of your project: directly under the "Hwk1" folder (for example).

Finally, the zip file also contains a README.txt for this assignment, which you will need to fill out with details about your assignment and turn in along with your code. I recommend you import this into your Eclipse project as well, so you don't forget about it!

Assignment Details

I recommend you read through all of these instructions carefully before you begin! There are a couple of different pieces to this assignment you will need to complete.

Think through how you will organize and complete each method before you begin. You should outline your code, writing the method signatures and JavaDocs before you fill in the algorithm details. This will help you figure out what methods go where and call what. If you get stuck, come and see me!

This isn't a small amount of work. GET STARTED EARLY!

Submitting

BEFORE YOU SUBMIT: make sure your code is fully documented and functional! If your code doesn't run, I can't give you credit! Your name should be in the class comment at the top of each class.

Submit your program to the Hwk1 submission folder on vhedwig, following the instructions detailed in Lab A. Make sure you upload your work to the correct folder!. You should upload your entire src folder with all your classes, as well as your movies.txt if you added any films. Be sure to complete the provided README.txt file with details about your program.

The homework is due at midnight on Thu Sep 11.

Extensions

There are lots of extensions you could add to this assignment. You could add the ability to modify movies, to add or remove actors, to sort films by some criteria (or multiple criteria), or to track other information such as genre(s), the running time, or box office receipts.

Grading

This assignment will be graded out of 30 points: