Question: 1. (25 points) Create a class named Book that has the following instance variables: - int bookID - String title - String ISBN - Int
1. (25 points) Create a class named Book that has the following instance variables: - int bookID - String title - String ISBN - Int year - String authorName a. Provide the appropriate accessor and mutator methods. b. Define appropriate constructors where one is the default constructor. c. Define a tostring method that outputs a Book object and an equals method that compares two books. d. Add a method that displays the Book object's values. 2. (25 points) Write a class named Book_Demo that includes the following: - Creates 4 objects of type Book. - Use constructors to initialize each of the objects. - Display the all the object's values using the methods written above. - Compare two Book objects and output whether they are equal. - Create an Array or an Array List that holds all the Book objects and output the contents of the Array or Array List
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
