Question: use cpp Define a class called Book. The Book class should store attributes such as the title, ISBN, author, edition, publisher, and year of publication.
use cpp Define a class called Book. The Book class should store attributes such as the title, ISBN, author, edition, publisher, and year of publication. These attributes must be private.
Provide public getset methods in this class to access these attributes. Test your Book class by creating several books and displaying the attributes. You may start with the Book program you wrote for Assignment Problem
Define a class called Bookshelf, which contains only a main method. The Bookshelf class must create a dozen Book objects with distinct attributes, and it must store them in an ArrayList of Books.
The Bookshelf class must then list all the attributes of all books in the ArrayList in the order they were entered into the ArrayList.
Create a sort function for Bookshelf, which will sort books in the ArrayList in ascending order by name, and then by year of publication.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
