Question: Create a Book class with the given fields and methods (attached). Also, make sure to define the constructors. Details: Write a demo class to create
Create a Book class with the given fields and methods (attached). Also, make sure to define the constructors.
Details:
Write a demo class to create two Book objects. First, create a Book1 object that represents your book (Java for Dummies), and second, create another Book2 object that holds information about the users favorite book. For Book2 object, get input for the book information from the user. Finally, display the book information (e.g., title, author, publisher) for both objects.
Define toString() method if needed.
Include comments in your code explaining what tasks are performed by different classes, methods, and statements of your code.

Book title: String author: String publisher: String - + Book + Bookt:String, a:String, p:String) + setTitle(t:String): void + setAuthor(a:String): void + setPublisher(p:String): void + getTitle(): String + getAuthor(): String + getPublisher(): String
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
