The objective of this assignment is to design and implement a tool rental management system (for stores such as Home-Depot) using the MVC compound pattern. The project can ONLY be implemented using either Java or C#. The system is made of the following entities:
1. Customers: They rent tools in the rental system. Customers are stored in a file called "Customers.txt".
2. Tools: These are the objects to be rented. Tools are stored in a file called "tools.txt".
3. Rental_data: These are the recorded information about who rented which tool, the date of rental, and date of return. Rental_data are stored in a file called "rental_data.txt".
Customers.txt
Customer_id; name; deleted
if deleted=false then the Customer is active in the system, if deleted=true then the Customer is logically deleted.
Examples:
300; Thomas Jefferson; false (active customer)
200; John Smith; true (deleted customer)
tools.txt
tool_id; tool_name; rented
if rented=false then it is available (not rented), if rented=true is rented.
Examples:
1; Drills & Drivers; false
2; Bolt Cutters; true
3; Handheld Sanders; true
rental_data.txt
rental_id; customer_id; tool_id; date_out; date_in
date_out and date_in should be stored in format mm-dd-yyyy (if the tool has not been returned, then date_in should be empty).
Every time a tool is rented, a record should be placed in the file “rental_data.txt”, and a record is updated every time a tool is returned.
Examples:
10; 300; 1; 9-30-2017;
11; 300; 2; 9-30-2017; 11-02-2017
In the first case shown above, the customer Thomas Jefferson rented the tool “Drills & Drivers” on 9-30-2017
In the second case shown above, the customer Thomas Jefferson rented the tool “Bolt Cutters” on 9-30-2017 and returned it on 11-02-2017.
The system should implement the following transactions:
For Customers:
For Tools
Your design must follow the dynamics of the Model-Viewer-Controller design, which includes the following requirements:
The model consists of the classes that represent data, as well as the classes that load, store, look up, or operate on data. These classes know nothing about what information is displayed to the user and how it is formatted. Rather, the model exposes observer methods the view can call to get the information it needs. In general, functionalities of the model include:
The view implements the user interface. It should store as little data and perform as little computation as possible; instead, it should rely on the model for data storage and manipulation. The view decides how the user sees and interacts with this data. Does the user interact with a text interface (command lines) or a GUI?
The controller listens to user input and handles all user interactions. Based on the user's keystrokes, mouse clicks, etc., the controller determines their intentions and dispatches to the appropriate methods that are implemented in the model or view.