Vous êtes sur la page 1sur 6

1

Rent a Vehicle

1. Introduction to application & how it works.
















Step1. Register new customer
First time when we open the application, we register a new customer. If the customer is already
registered go to step 2. All we have to do is to fill these empty fields and then press the "Register Customer "
button.
Once we pressed that button the customer is registered in the DB. Now, to create an order we have to
search for the customer in the DB.
Step2. Search for customer
First step after register a new customer is to check the "use registered customer" checkbox.
This checkbox must be checked also if the customer is already registered. Then search for the
customer in DB. Just type his/her Name or Phone number. Then a list of customers matching your info will
be displayed in the Textarea at num. 3.




2

Step3. Make an order
To register an order we have to go through the steps above mentioned. Once we have the list of
found customers we need to write the customer ID in "Customer ID" field. Then select what type of vehicle
wants the client and then the model. After fill the dates when the vehicle is wanted and when the client must
return it. If no model is displayed it means that vehicles of that type are unavailable/in use.
If all these steps are completed you just need to press "Submit order" button.. and the request is sent.
This is how an order should look like:



























3


Return Vehicles















When a customer returns a vehicle here's what you need to do:
Step1. Search for orders - you just type the customer info in the field and press enter.
Step2. In "List of orders" you'll find the customer's current orders. Insert in "Insert Order ID" field the
orderID displayed in list of orders.
Step3. Insert the percent of fuel left in the Tank.
Step4. If there is any damage done to the vehicle write in the TextArea below the "Fuel capacity in %".
Step5. Press the "Submit button" and the registration is done.
In the third tab I meant to make a list of all orders and a list of all vehicles with the possibility of making
changes to them. Like update a vehicle status or modify an order. Unfortunately I didn't have enough time to
complete it.





4



2. Database Structure
Customers Table:
CustomerID: this is the index of this table. Every customer has a unique ID.
lastname & firstname: represents customer's name.
address: customer's address.
phone: customer's phone number.



Vehicles Table:
VehicleID: this is the index of this table. Every vehicle has a unique ID.
Type: represents what type of vehicle it is. ex: Truck , Sedan ...
Brand: represents the brand of the vehicle. ex: Volvo, Ford .. etc.
Status: represents the status of the vehicle..this can be :
1 - Available : means the vehicle is ready to be rent.
2 - Unavailable: means the vehicle is unavailable (can be damaged/out
of use/ have empty fuel tank....)
3 - InUse: means the vehicle is currently taken or soon to be taken.




order_list Table:
OrderID: The index of this table. Every order has a unique id.
CustomerID: Registers customer ID so you know who made the order.
VehicleID : Registers the ID of a vehicle so you know which one is reserved.
RegDate: Represents the date&time when the order was submited.
RentDate: Represents the reservation date. Can be reserved for future.



5

ReturnDate: Represents the date when the vehicle must be returned.

returnorder Table:
returnID: The index of the table.
OrderID: Represents the ID of the order.
fuel: Represents how much of the fuel tank is filled in %.
damage: Represents the damage done to the vehicle.




The application can be extended to support other vehicle types !
All you need to do is to add the new types to Database.

And the Vehicle becomes visible and available in the application.




Here's how the application should be developed to support multiple services:








class dataBase
connect()
RegisterNewCustomer()
close()
.......................
CommonGUIElements
JTextField searchbyLN;
JTextField searchbyFN;
JTextField searchbyPN;



6

Register new customer
new dataBase();
new JTextField("cus_info1");
new JTextField("cus_info2");
new JButton("Submit registration");


specific Tab1 elements.

(Can be skipped if the
customer is already
registered)
















Service 3,4..

Search for registered customer
new dataBase();
new JTextField("search_info_1");
new JTextField("search_info_2");
-------Select the customer----------
new JButton("Go to service");
new JButton("Go to service");
.....................
new JButton("Go to service");



Service 1
new dataBase();

Tab 1
new
CommonGUIElem
ents();


specific
Tab1
elements.
Tab 2
new
CommonGUIElem
ents();


specific
Tab2
elements.
Tab 2
new
CommonGUIElem
ents();


specific
Tab2
elements.
Tab 1
new
CommonGUIElem
ents();


specific
Tab1
elements.
Service 2
new dataBase();

Vous aimerez peut-être aussi