Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are freelance developer and you have been subcontracted by a larger project to create a small library management system. This application will help the

You are freelance developer and you have been subcontracted by a larger project to create a small library management system. This application will help the librarians manage the book catalogs for their library. You have been asked to build the classes required to meet the given requirements.

The library identifies each item that it checks outs as a libraryItem.

A libraryItem can be either a book, or a video.

A library item has the following attributes: a numeric callNumber, title and availability status.

No libraryItem should be created without a callNumber- and that means there are no default constructors for this class.

In addition to the getters and setters there are two methods: checkout() and return() that sets the availability to false and true, respectively.

The book entity is defined by the following attributes: ISBN, Book author, book publisher

The video entity is defined by the following attributes: studio, artist.

A catalog is a collection of all the libraryItems belonging to the library. The catalog class will contain a reference variable pointing to the collection of (either as an array, or as an ArrayList). The catalog should implement the interface: searchable and viewable to meet each of the requirements: It should be searchable using the library items call Number It should be searchable using the library items title It should be searchable using the library items author , or artists name. It should be viewable, such that information about the books and the video items must be displayed to the user. A checkOutItem extends the library item. The checkOutItem has additional attributes due date, accountHolderId.

A transaction entity contains a list of checkOutItems checked out. The collection of checkOutItems can be modeled either as an array, or as an ArrayList. The transaction entity implements the interfaces: addable and removable, such that each checkOutItems can be added, or removed from the list. When an item is removed from the list, the available status of the libraryItem in the catalog is set to true, by calling the checkout method. When an item is added to the transaction list, the available status of the libraryItem in the catalog is set to false by calling the return method. While the basic requirements for the library system is outlines as above, you may add additional attributes and methods as required to support the program. Your application should be able to perform the following functions:

1) The user should create a transaction object

2) The application should be able to create a catalog object by populating an array/ array list with several samples libraryItems- both books and videos.

3) The catalog should be viewed/ printed out for the user to see.

4) The user should be able to search the catalog to obtain the appropriate libraryItem. The user should provide values for any of the following during the search: callNumber, title.

5) The user should be asked by the system if he/she wants to search a book , or a video and depending on the answer, take the author, or artists name to search.

6) The user should be able to create a checkOutItem object using the libraryItem , a due date, and an accountHolderId value.

7) The user should be able to add the checkOutItem to the transaction. The available status of the libraryItem on the catalog should appear as false after this step

8) The user should be able to create and add a few more checkOutItems to the transaction.

9) The user should be able to remove a libraryItem from the transaction. The available status of the libraryItem on the catalog should appear as true after this step

Please describe your classes and interfaces using a suitable class diagram.

Submit your classes and the tester class as a single folder.

Your tester class should test all the steps described above in the given order.

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

Laboratory Auditing For Quality And Regulatory Compliance

Authors: Donald C. Singer, Raluca-Ioana Stefan, Jacobus F. Van Staden

1st Edition

0367392461, 978-0367392468

More Books

Students also viewed these Accounting questions

Question

4. Identify cultural variations in communication style.

Answered: 1 week ago