WOD 5: Movie DB

To practice working with ArrayLists, we’re going to create a simple movie DB.

Instructions

Rx: <15 min Av: 15-30 min Sd: 30-45 min DNF: 45+ min

  1. Write down your start time on your notecard.
  2. Download MovieDB.zip and import it into your workspace.
  3. Rename the project to include your uLogin
  4. Create a MovieDB class that:
    • Stores a list of movies as an ArrayList, and initializes the list to be empty.
    • Has a method addMovie that adds a movie to the ArrayList.
    • Has a print method that prints the entire movie list using a for each loop.
    • Has a getOldestMovie method that returns the Movie object with the oldest year.
    • Has a main method that adds 3 movies to the MovieDB, and prints them out by calling the print method.
  5. Run the program to verify your changes.
  6. Export your program by right-clicking on your project folder, and selecting Export > General > Archive File. Name the file MovieDB_uLogin.zip.
  7. Upload the file to the assignment page on canvas.
  8. Write down your stop time on your notecard.