Question: Javascript please Create a simplistic library system consisting of ( only ) books and magazines. Objects in your system: Book Has a title of type
Javascript please
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
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 CTRLSHIFTF or Mac equivalent
Must leverage inheritance
Must match the following output exactly when executed with the test published works as stated above:
class lib.Book: titleCrime and Punishment,publisherSimon and Schuster
class lib.Book: titleThe Hobbit,publisherHarper Collins
class lib.Magazine: titleSports Illustrated,publisherRandom HouseJavascript
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
