Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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. image text in transcribedimage text in transcribedimage text in transcribed

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

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_2

Step: 3

blur-text-image_step3

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