Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Define a JAVA class called Book . The Book class should store attributes such as the title, ISBN, author, edition, publisher, and year of publication.

Define a JAVA 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 get/set 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 2, Problem 2.

Define a class called Bookshelf, which contains only a main() method. The Bookshelf class must create a dozen (12) 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.

I will appreciate it if you document code changes and observations as in-line comments, and excerpts so that I will understand everything. Please write as many words explaining in detailed how you did this, preferably inline comments for everything. Thank you.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

If Jennifer and Pierre decide to use succession planning, \

Answered: 1 week ago

Question

LO2 Compare three types of individual incentives.

Answered: 1 week ago