The objective of this project is to develop a book lending management system (for use by small libraries) using the MVC compound pattern. The project can be implemented using either Java, or C#. The system is made of the following entities:

1.Clients: They lend books from a library that uses the system. Clients are stored in a file called clients.txt.

2.Books: These are the objects to be lent. Books are stored in a file called books.txt.

3.Lending_Info: These are the information about who lent which book, the date of lending, the date of return, and the amount of fine if the book is returned late. Lending_Info are stored in a file called lending_info.txt.

File Structure

(1) clients.txt

client_id; name; deleted

if deleted=0 then client is active in the system, if deleted=1 then the client is logically deleted.

Example:

1; David Jones; 0
3; Bob Smith; 1

(2) books.txt

book_id; book_title; lent

if lent=0 then is not lent currently, if lent=1 is lent.

Example:

10; Java How to Program; 1
11; Operating Systems; 0

(3) lending_info.txt

borrow_id; client_id; book_id; date_out; date_in; fine_amount

date_out and date_in should be stored in format mm/dd/yyyy

if the book is lent but has not been returned, then both date_in and fine_amount are empty.

A record should be placed in this file every time a book is lent, and a record is updated every time a book is returned.

A client can borrow up to three books for two week (14 days). There will NO fine if a book is returned within 24 hours after the due date (i.e., the number of late hours <= 24). The fine will be $1 if the number of late hours is greater than 24 but at most 48. The fine will be increased by $1 for every additional 24 hours. To simplify the calculation of fines for books returned late, you may assume that the checkout time of any book used by the system is 11:59 PM of the day the book is borrowed.

Example:

100; 3; 10; 4/18/2016;
101; 3; 11; 4/18/2016; 4/19/2016; $0
102; 3; 11; 3/1/2018; 3/17/2018; $1

In the first case shown above, the client called Bob Smith borrowed the book "Java How to Program" on 4/18/2016

In the second case shown above, the client called Bob Smith borrowed the book "Operating Systems" on 4/18/2016 and returned it on 4/19/2016, and the fine will be $0 since the book is returned in time

In the third case shown above, the client called Bob Smith borrowed the book "Operating Systems" on 3/1/2018 and returned it on 3/17/2018, and the fine will be $1 since the book is returned two days late (the number of late hours <= 48).

Requirements

The system should be able to handle the following transactions:

For Clients:

1.Create a client.
2.Delete a client. A client does not get physically deleted from the system. A flag in the record in file just states if the client is "logically" deleted.
3.Search a client by last name, first name and show its information
4.Show all clients

For Books

1.Add a book to the system.
2.Lend a book.
3.Return a book.
4.Show all books, showing current lent books first.
5.Show current lent books.
6.Show who has historically lent a particular book, sorting in descending order by date of lending.

Restrictions

Your design must follow the dynamics of the Model-View-Controller compound pattern, which includes the following requirements of MVC:

1) have at least ONE interface for the Model, at least ONE interface for the View, and at least ONE interface for the Controller
2) each Model class should contain a reference to the ViewInterface so that the Model and the View can interact with each other
3) each View class should contain a reference to the ControllerInterface and a reference to the ModelInterface
4) each Controller class should contain a reference to the ModelInterface
5) refer to the class diagram for the MVC compound pattern discussed in Chapter 12

Every time the application starts, it should allow the system to find/choose the location of the files.

A client can lend at most 3 books from the library. If a client tries to lend a 4th book, the system must tell the client that he/she is unable to lend the book.

The library only has one copy of a book. If the client tries to lend a book that is currently lent, the system must tell that the book is not available.

your project uses GUIs for user interactions.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.