Library Card Program

Job Description:

The library problem.

You assignment is to create three classes, a library class, a book class and a cardholder class. I have suggested fields you may work with your own as you see fit as long as you accomplish the goal of borrowing and return books then generating the reports requested.

A book will have the title of the book, the Catalog number, the author, an indicator as to whether or not it is checked out and the card number of the cardholder who had it.

String name

int Catalog number

int cardholder ID

char checkedOut

The library class will have a library code and address, and a collection of 25 books.

String name

String Address

int code

book[] collection

Your card holder will have a card number, a name and a collection of up to 5 books. For this exercise a card holder cannot borrow more than 5 books and your methods must verify that.

String name

int cardNo

Book[] borrowedBooks

1. The library class must have a check out and a check in method. These method will affect the book collection by noting the book is checked out and by whom, as well as the card holders list of borrowed books.

2. You must produce two reports, a report of books currently checked out and by whom, and a report of books currently available.

3. A key this problem is that the library class must update the books in the collection and update the cardholder, (think about the odometer/fuel gauge).

4. You library demo class will have an array of 5 card holders available to work with.

5. You may fill your book array and cardholder array in the Library demo via hard coded constructors, however you will need to use a filet to test your borrow and return methods. The file will be set up as follows

transType int 1 for borrow, 2 for return

cardholder int 5 digit card holder code

bookId int 3 digit id to identify the book.

The algorithm is simple in the demo class, you will read a transaction, if it is a 1 call the library borrow method, that method will update the book record in the book collection and will update the list of borrowed books for the client, If the transaction is a 2 you will call the library return method which will update the book collection and make it available as well as set the cardholder code to -1, as well as remove the book from the cardholders list of borrowed books. Once you have processed the transactions generate the reports and use your toString method in the Card holders to show that the books are listed or removed from the card holders lists.

Of course you will include any accessors and mutators you need as well as us the proper search techniques to maintain the array lists.

Taidot: Java

Tietoa asiakkaasta:
( 1 arvostelu ) Piscataway, United States

Projektin tunnus: #7866977

Myönnetty käyttäjälle:


Hi sir, I have read the problem statement and will write the java code. Ready to start right away. Thanks

$15 USD 1 päivässä
(4 Arvostelua)