Project 4
Due Wednesday, April 19 11:55pm.
Submission through SVN.
Please submit your work in SVN directory
https://www.cs.usfca.edu/svn/< your username >/cs112/proj4
e.g. https://www.cs.usfca.edu/svn/ejung/cs112/proj4
Learning outcome
You will continue to learn to read JavaDoc and implement matching the specifications in JavaDoc. You will also get more familiar with class and method interactions. Your in-class projects and lab 1 had similar code for user login, but you will build a new user database in USFlix, including the rating information.
Specifications
JavaDoc contains suggested specification. Your submission should provide all the functionalities below. If your submission deviates from the JavaDoc, your Driver must demonstrate all the functionalities.
- (40%) User Accounts
- (10%) When a new user account is created, user needs to enter the first name, the last name, username, and password. The username has to be unique. The password should not contain username, and has to be at least 6 charaters long. Other classes should not be able to directly read or modify any of these variables.
- (10%) User logs in with username and password.
- (5%) User can log out at any time.
- (5%) Your program can load user database from a file. Here is a sample file
.Sample file contains first name, last name, username, password, and the list of movies and their ratings that this user has seen so far. "done" is the keyword to mark the end of one user information.
- (10%) User can see the list of movies he or she has seen. If the user has rated any of these movies, then the list also shows the ratings. For other movies, the list shows the average rating.
Hint:The updated search result will display the ratings similarly. You may create a method in User class to handle this Movie information display.
- (20%) Movie Ratings
- (10%) When a new user logs in for the first time, ask the user to rate movies he or she has seen before. Let the user search the movies by title (or director if you have done extra credit in project 3). The rating has to be between 0.5 and 5. If user enters any number outside of this range, ask user again. This rating information is stored in User object.
- (5%) Whenever there is a new rating, update the average rating of the Movie.
- (5%) When user watches a new movie, then the rating is set automatically to be 0 to indicate that the user has watched the movie but hasn't rated.
- (25%) Updated Search
- (5%) User can search by title (and or director) only after logging in.
- (10%) The search result now shows either the average rating or the user's rating, along with the movie title and year.
- (5%) User can choose to rate a movie from a search result.
- (5%) User can choose to "watch" a movie from a search result.
- (10%) Driver class handles all the user interactions. You may use some of the code in here. Note that this Driver example is not complete.
- (5%) README explains how your program works.
Extra credit
If you wish to receive extra credit, then note which one you have tried in README.
- (Up to 10%) Add Lab 3 to movie description. In the search result, first show the titles and years only. When user chooses one movie from the search result, show all the information: title, director, year, and the rating distribution.
Submission
Submit all your Java files and Driver that tests your code to show that your code satisfies all the functionalities. If your program does not satisfy all functionalities, then explain in REAMDE which ones work. In the README, explain how you implemented functionalities.