Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a simplistic library system consisting of ( only ) books and magazines. Objects in your system: Book: Has a title of type String Has

Create a simplistic library system consisting of (only) books and magazines. Objects
in your system:
Book:
Has a title of type String
Has an author of type String
Has a publisher of type String
Magazine:
Has a title of type String
Has a publisher of type String
Has a print date of type LocalDate
Library:
Has a main() method
Creates three published works:
A book of title "Crime and Punishment" with author "Dostoevsky" and
publisher of "Simon and Schuster"
A magazine of title "Sports Illustrated" with publisher "Random House" and
print date of 0131?2008
A book of title "The Hobbit" with author "Tolkien" and publisher "Harper
Collins"
Has a method named printCollection() that will print N(any number) of published
works using a toString() method that includes the class name by using
"this.getClass()". See lesson videos for an example.
Your solution:
Must be formatted with extra empty lines removed and proper indentation. Use
CTRL-SHIFT-F (or Mac equivalent)!
Must leverage inheritance
Must match the following output exactly when executed with the test published
works as stated above PLEASE MAKE THE EXACT EXECUTION HERE BELOW!:
class lib.Book: {title=Crime and Punishment,publisher=Simon and Schuster}
class lib.Book: {title=The Hobbit,publisher=Harper Collins}
class lib.Magazine: {title=Sports Illustrated,publisher=Random House}
image text in transcribed

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

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

0262660709, 978-0262660709

More Books

Students also viewed these Databases questions

Question

Question Can plan participants borrow from a VEBA?

Answered: 1 week ago

Question

Question What is an educational benefit trust and how is it used?

Answered: 1 week ago

Question

Question How are VEBA assets allocated when a plan terminates?

Answered: 1 week ago