Question: Help me write this code for this assignment in JAVA. Spring 2023 CSCl 3353 Assignment 2 Bolotin Extended class Add the following to Book: -

Help me write this code for this assignment in JAVA. Help me write this code for this assignment in JAVA. Spring 2023CSCl 3353 Assignment 2 Bolotin Extended class Add the following to Book:- instance variable, getter, setter for rating, and toString() should return rating

Spring 2023 CSCl 3353 Assignment 2 Bolotin Extended class Add the following to Book: - instance variable, getter, setter for rating, and toString() should return rating - abstract method randomRating() Create an enumerated type Genre with values MYSTERY, FANTASY, HUMOR Create Fiction and NonFiction classes that extend Book and contain the following: Fiction - instance variable, getter, setter for genre - no argument constructor that sets default values as "Murder on the Orient Express", 212, "white", Genre.MYSTERY - argument constructor that lets user specify properties for four variables - boolean method isSameGenre() that compares two books' genres - randomRating() method that returns random value in the following ranges: MYSTERY 3 TO 5; FANTASY 2 TO 4; HUMOR 1 TO 5 - toString method() that adds genre to string returned NonFiction - integer instance variable, getter, setter for call number - no argument constructor that sets default call number as 005 - argument constructor that lets user specify properties for four variables - boolean method hasSameCallNumber() that compares two books' call numbers - randomRating() method that returns random value in the following ranges: CALL NUMBER

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!