You are to design and build prototype software (stand-alone application loaded on business’s local computer) to manage transactions and vehicles that can be rented leased, or bought from the business. Your software will be used and called by User Interface (UI) that someone else will be implementing. You will get to design the UI in assignment 8 but you will not be implementing it. You can assume that the UI layer will be vendor’s code and packaged in a separate package than your system.
Your software will allow loading and managing vehicle transactions for the business. When the system starts up, the system will automatically load the list of available vehicles. A list of transactions will only be loaded upon request from UI after the system starts.
For the prototype the data will be loaded and saved in text files on the local system (for the final product outside the scope of this project, server with database will be used). UI will not know the location or methodology or interact directly with the data storage. Your system will manage all the data and it has to update the files as needed to support the expected functionality. The UI will only have capability to download specific data to a local file as indicated later in the document.
After the vehicle data is loaded on startup, the user (using UI) will be able to add new vehicle to the available list by providing all the vehicle information in the GUI (passed as object to manager class) or by loading vehicle data from a local file (passing filename to the manager class). The system will add the new vehicle to the loaded list and update the stored list as well.
Vehicle data includes make, model, 17 character VIN, 4 digit year, type (0 for Sedan, 1 for Truck/Van, and 2 for SUV), and price. Vehicle cannot exist without these values and they cannot be changed.
A customer of the business can perform one of three transactions: lease a vehicle, rent a vehicle, or buy a vehicle. Each transaction will include a unique transaction id generated by UI, customer data, vehicle data, transaction price, transaction start date (when the lease, rent, or buy will take effect), and transaction activation date (when transaction was moved from draft to active). Transaction must have id, start date, customer, and vehicle at creation and id cannot be changed.
When a transaction is first created, it is in draft mode and the system will automatically calculate the transaction price. If the vehicle data or any transaction data is changed, the system will automatically update the transaction price. Note that only available vehicles may be added to the transaction. Vehicle data and start date can only be changed while the transaction is in draft mode.
UI will create a transaction and pass the object to the organizer/manager to add the transaction file. The organizer/manager will do the necessary validation. Similar for editing transaction - UI will pass the updated transaction record and organizer/manager will do the validation and update the transaction file.
When customer requests the transaction to be activated, the system will change the transaction state to active (as opposed to draft) and it will update the transaction activation date (that is when payment will be processed however it is out of the scope of this system). A transaction cannot be activated if it is past transaction start date. No additional changes can be made to an activated transaction. A transaction can be cancelled at any time when in draft mode and once activated only before transaction start date.
Customer data will include first name, last name, mailing address, phone number, and email. All the data must have values at creation but it can be changed.
Rent transaction will also have number of days for the rental; lease transaction will also have the number of months that the lease will last, and buy transaction will also have the price of extended warranty. All of these values must be set at transaction creation. The data can only be changed when transaction is in draft mode.