Question: java problems. q1, q2,q3,q4, and q5 are related. I can't put all questions together so please do all 5 questions by one person Q2. MediaDocument

java problems. q1, q2,q3,q4, and q5 are related. I can't put alljava problems. q1, q2,q3,q4, and q5 are related. I can't put all questions together so please do all 5 questions by one person

Q2. MediaDocument an abstract class) Implement a class, called MediaDocument, to represent the characteristics that are common to all the media documents. All the media documents have a method int getRating0, however the implementation of the method is specific to the kind of document. 1. A MediaDocument is a specialised kind of Document. Therefore, it must be a subclass of Document 2. All media documents have a duration (of type int) 3. The class MediaDocument has a single constructor. Its signature is as follows: public MediaDocument(String name, String owner, int duration It initialises the characteristics that are common to all Documents, as well as the duration Q3. Movie A Movie is a specialised MediaDocument that also has information about the rating of the story and acting. More precisely, l. A Movie is a (concrete) subclass of MediaDocument; 2. It also stores information about the rating of the story and the acting (both of type int). This information (two numbers in the range 1 10) is given as an argument to the constructor; 3. It has a single constructor and here is its signature: public Movie String name, String owner, int duration, int story, int acting). It serves to initialise all the characteristics that are common to all media documents, as well as the story and acting ratings. You can assume that the numbers, ratings, are valid, 4. public int getStoryRating0: returns the story rating; 5. public int getActingRating0: returns the acting rating; 6. It implements the method public int getRating0, which returns the average of the story and acting ratings rounded to the nearest integer

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!