HW05: OOP MovieUI due Mon 19 Feb 10:00

\begin{purpose}
In this assignment you will:
\begin{itemize}
\item Culminate...
...ase program to
a classic object-oriented design.
\end{itemize}
\end{purpose}

Allowed and Disallowed Resources

In completing this assignment you MAY use/access the following resources:

You may NOT use/access:

Failure to abide by these guidelines will result in a zero for the assignment and the incident will be reported to the university provost as a violation of the university academic integrity policy. A second incident of academic dishonesty (whether from this course or another computer science course) will result in an F in the course.

Instructions

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:

MovieUI
– 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");
mui.run();

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();
   kb.nextLine();
   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.

Grading

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.