Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Video Task: public class Video extends Media ( 10pts ) This class represents a specific type of media: movies. It adds on to the existing
Video Task: public class Video extends Media
(10pts) This class represents a specific type of media: movies. It adds on to the existing Media by including information about the movie: the movie's rating (G, PG, R, etc) and runtime (in minutes). Additionally, it contains information about whether the movie is a DVD or a Bluray. This class should provide the following:
- public static final int DVD = 0;
- public static final int BLURAY = 1;
- public Video(String name, int year, int runtime, String rating, int format) a constructor which initializes the movie with the provided name, publication year, runtime in minutes, rating, and format (DVD or BLURAY).
- public int getRuntime() retrieves the stored runtime.
- public String getRating() retrieves the stored rating.
- public int getFormat() retrieves the stored disc format.
- @Override public String toString() displays information about the video as a string, in the format "NAME (YEAR) FORMAT [RATING, RUNTIME min]". Print the format as either DVD or BLURAY. For example:
The Imitation Game (2014) DVD [PG-13, 114 min]
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