Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Requirements for Skeleton of Theatre, Movie and Play Theatre title: String atig: int Theatre (afitle:String, aRating: int) Theatre (toCopy Theatre) +getTitie: String +getCategory)String +getRating :

image text in transcribed

image text in transcribed

Requirements for Skeleton of Theatre, Movie and Play Theatre title: String atig: int Theatre (afitle:String, aRating: int) Theatre (toCopy Theatre) +getTitie: String +getCategory)String +getRating : int +setRating (aRating:int) Movie Play -director: String -writer: String yearWritten: int Play(aTitle:String, aRating:int,aWriter:String, releaseDate: Date Movie(aTitle:String, aRatingiint, aDirector:String, aReleaseDate:Date) yearWritten:int) +Movie(tocopy Movie) +getCategory) String +getDirector String +setDirector (aDirector:String) +getReleaseDate Date +Play (toCopy: Play) getYearNritten ) int +etYearNritten (year:int) +getwriter String setReleaseDate (aReleaseDate Date) +getCategoryO: String Additional Requirements Theatre title: The instance should always store the string in all upper case, if the method is called with a string that contains any lower case characters, the lower case characters should be converted to upper case rating must be a value between 0 and 10 (inclusive). If the rating provided is outside of that range, the rating should remain unchanged getCategory: A movie is considered A category if its rating is 9 or 10, B category if the rating is 7 or 8, C category if the rating is 5 or 6, D category if the rating is 3 or 4 and F category otherwise Movie releaseDate: Is at most one year in the future. Otherwise leave unchanged. If no date set at all set the release date to the current date. getCategory: Override from parent to precede with release date and '-'. Call parent getCategory to accomplish this, do not call getRating from parent. Play yearWritten: must be before 2019. getCategory: Override from parent to return 'Classic if it was written more than 200 years ago, Contemporary if it was written more than 50 years ago and 'Modern' otherwise. Using the Date class Import from java.util The only Date class you need to create is one that represents now, which is returned by the default constructor in the Date class. All other dates will be passed as arguments. (Note that this may be null) . The method getTime) in the Date class returns the number of milliseconds since the Epoch. If you have two Date objects d1 and d2, with d1 a later date, the number of milliseconds between the two is d1.getTime) d2.getTime) Use boolean methods before(Date) and after(Date) to compare two dates. For example, d1.before(d2) will return true if d1 appears in time before d2. Notes: Do not duplicate instance variables from parent class in child class. Instead invoke appropriate super constructor and methods in parent class. Requirements for Skeleton of Theatre, Movie and Play Theatre title: String atig: int Theatre (afitle:String, aRating: int) Theatre (toCopy Theatre) +getTitie: String +getCategory)String +getRating : int +setRating (aRating:int) Movie Play -director: String -writer: String yearWritten: int Play(aTitle:String, aRating:int,aWriter:String, releaseDate: Date Movie(aTitle:String, aRatingiint, aDirector:String, aReleaseDate:Date) yearWritten:int) +Movie(tocopy Movie) +getCategory) String +getDirector String +setDirector (aDirector:String) +getReleaseDate Date +Play (toCopy: Play) getYearNritten ) int +etYearNritten (year:int) +getwriter String setReleaseDate (aReleaseDate Date) +getCategoryO: String Additional Requirements Theatre title: The instance should always store the string in all upper case, if the method is called with a string that contains any lower case characters, the lower case characters should be converted to upper case rating must be a value between 0 and 10 (inclusive). If the rating provided is outside of that range, the rating should remain unchanged getCategory: A movie is considered A category if its rating is 9 or 10, B category if the rating is 7 or 8, C category if the rating is 5 or 6, D category if the rating is 3 or 4 and F category otherwise Movie releaseDate: Is at most one year in the future. Otherwise leave unchanged. If no date set at all set the release date to the current date. getCategory: Override from parent to precede with release date and '-'. Call parent getCategory to accomplish this, do not call getRating from parent. Play yearWritten: must be before 2019. getCategory: Override from parent to return 'Classic if it was written more than 200 years ago, Contemporary if it was written more than 50 years ago and 'Modern' otherwise. Using the Date class Import from java.util The only Date class you need to create is one that represents now, which is returned by the default constructor in the Date class. All other dates will be passed as arguments. (Note that this may be null) . The method getTime) in the Date class returns the number of milliseconds since the Epoch. If you have two Date objects d1 and d2, with d1 a later date, the number of milliseconds between the two is d1.getTime) d2.getTime) Use boolean methods before(Date) and after(Date) to compare two dates. For example, d1.before(d2) will return true if d1 appears in time before d2. Notes: Do not duplicate instance variables from parent class in child class. Instead invoke appropriate super constructor and methods in parent class

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions