Question: 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

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 Databases Questions!