Question
Java program. Mike's Movie Theater is a local cinema showing the latest Hollywood hits. Create a class called Movie that stores basic information about a
Java program.
Mike's Movie Theater is a local cinema showing the latest Hollywood hits. Create a class called Movie that stores basic information about a single movie: the title, the running time or length of the film (in minutes), the showtimes (as a single string, such as "11:00,3:15,7:30"), and the film's rating (R, PG-13, PG, or G). Include get and set methods for each; the setter for rating should check that the value is one of the four valid options and, if not, should set the rating to "Not Rated". Be sure to include a constructor that allows values to be set upon instantiation. Finally, a method called addPreviews should accept the number of previews to be shown prior to the movie, and then add 2 minutes for each to the movie's running time.
Demonstrate that your class works in a program called MovieDemo. It does not need to have user input, but make sure you demonstrate that all methods and fields work correctly.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started