Question: Code a class called Movie with three instance variables. String title, boolean restricted, String customer _ reviews. The class is required to be complete with

Code a class called Movie with three instance variables. String title, boolean restricted, String customer_reviews. The class is required to be complete with a default constructor, a custom constructor, a set() method for each instance variable, a get() method for each instance variable and a toString() method.
Develop a tester class with a main method that
1) reads values from a text file called movies.txt and uses the values to instantiate objects of your Movie class and add them to an array list. Hint: Each object would hold 3 values: a movie title, a boolean flag that's true if the movie is restricted and false otherwise, and a one or more customer reviews.
2) presents the user with a menu that shows the list of Movie objects and then allows the user to (1) add a movie to the list (2) add a review to an existing movie (3) save the list of movies (4) Exit.
Hints:
Validate your inputs and catch and handle your exceptions. You may be creative with how you want to implement the list of reviews. Consider adding 5-star rating value as a 4th instance variable.
Menu options --
Option (1) Asks the user to key in the values they want for title, restricted and customer_reviews, and then uses these values to instantiate a Movie object to be added to the list. And then takes the user back to the 4 menu options.
Option (2) You choose how to enable the user to select a movie, and then generate a string holding any olds review, plus the review that the user wants to key in. This option then updates the reviews of the selected Movie object, and then takes the user back to the 4 menu options.
Option (3) saves the array list back out to the file without corrupting the structure of the file, so you can start your program again and pick up where you left off with your list of movies and reviews. And then takes the user back to the 4 menu options.
Option (4) asks the user if they want to save the list of movies. If the user chooses to save the list, save it, as you would for option (3) and then exit the program. Exit without saying otherwise
Rubric
(5 points) Class Movie
Has the required instance variable and methods correctly implemented.
(15 points @ 3 points each) Tester class
Correctly implements Reading from a text file.
Correctly implements Option 1.
Correctly implements Option 2.
Correctly implements Option 3.
Correctly implements Option 4.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!