Question: PP: Write a class called Book that contains three private instance variables: title, author, and publisher. Include public setter and getter methods for all instance

PP: Write a class called Book that contains three private instance variables: title, author, and publisher. Include public setter and getter methods for all instance variables. Include a toString method that returns a nicely formatted, multi-line description of the book. Create a driver class called Bookshelf, whose main method instantiates several Book objects and then print their descriptions.

Hint: you may find Die.java and RollingDice.java useful.

Sample Output:

Title: Java Software Solutions

Author: Lewis & Loftus

Pulbisher: Addison-Wesley

Title: Faces in Time

Author: Lewis Aleman

Pulbisher: Megalodon Entertainment

Title: Purple Cow

Author: Seth Godin

Pulbisher: Portfolio

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!