HW05: OOP MovieUI due Mon 20 Feb 10:00

In this assignment you will:
\item Culminate...
...ase program to
a classic object-oriented design.


In your workspace make sure you have the most recent code from the base repository and from your homework repository on bitbucket.

In this assignment you will finish the conversion of the movie database program to an object-oriented design by implementing a MovieUI class that adheres to the UML diagram below:

– MovieContainer mc a movie container
– Scanner kb Scanner for get user input
+ MovieUI(dataFile) creates MovieContainer and Scanner
+ void run() provides menu and chooses action
+ int menuChoice() displays menu and gets user choice
+ void enterMovie() get title, genre, year and add to container
+ void deleteMovie() get id from user and remove from container
+ void searchByTitle() get title from user and search container
+ void searchByGenre() get title from user and search container
+ void searchByYear() get title from user and search container

The driver will contain main() and will be short. My driver code in main() looked like this:

MovieUI mui= new MovieUI("../data/movielist.txt");

It may be hard to visualize what some of the methods in MovieUI should look like so I'm pasting in my solution for the searchByYear() method:

 * Search movies by number of years.
public void searchByYear()
   int year;
   System.out.print("Enter year: "); // get year from user
   year= kb.nextInt();
   mc.searchByYear(year);   // pass year along to our container

When this assignment is finished the program should be functioning as it did in its original version. However, the code is organized quite differently.

Continue your pattern of focusing on a single method at a time: write it, debug it, document it, and then commit it. As always, when the program is complete make sure all work is committed and pushed to your bitbucket repository.


The assignment will be graded according to the following criteria:
Correctness 16 pts
Documentation 2 pts
Conventions 2 pts
Version Control 2 pts
Total 22 pts

Your program should be completely working and should follow all of the programming conventions named in class and explained in https://josephus.hsutx.edu/classes/all/javaconventions/ (including the use of comments that conform to the JavaDoc guidelines).

The instructor will grade your work based on what you have pushed to the hosted homework repository you have shared. For all assignments the program is due before the beginning of class on the due date. Repositories that show a commit time after that time will be graded as late.