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:
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
