Question: Book -title: String -author: String -year: int -totalNumBooks: int +Book() +Book (title: String, author: String, year: int) +getSynopsis(): String +getTotalNumBooks (): int Create a Book

 Book -title: String -author: String -year: int -totalNumBooks: int +Book() +Book

Book -title: String -author: String -year: int -totalNumBooks: int +Book() +Book (title: String, author: String, year: int) +getSynopsis(): String +getTotalNumBooks (): int Create a Book class to represent individual books housed in a Library. Books have a title, author, and year as well as a method to retrieve a synopsis (short description) of the book. An incomplete (excludes some items like accessors/mutators, etc.) UML diagram for Book is provided. Implement ONLY the following in the class: The class header Declare all data members with appropriate visibility, modifiers, and data type. A constructor that takes a title, author, and year as parameters and appropriately uses those values. This constructor should update any other relevant data members. Accessor and mutator methods for the title data member. You may omit implementations for all other data members, but assume they exist. A getSynopsis() method that returns: "Title by Author (year)" with the appropriate values for the specific book Instance (include parentheses)

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!