Car Rental Input Output
Car Rental Input Output
When the online car system program is executed, the welcome page will be displayed.
Users can only enter 1 for 🡺Admins and 2 for 🡺 Customers. Other options will receive an error
message and option is requested again.
1.2 Admins
Once admins select 1 in the welcome page, they are required to enter the correct
username and password. If username and password are invalid, an error message will appear, and
the admins will be given opportunity to re-insert their username and password.
By entering the correct username and password, admins can get access to the
functionalities board with a welcome banner and functionalities menu provided for the admins to
choose from. This menu does not accept any input other than the number 1 to 8. As shown
above, number 0 and text “eight” is displayed with error message and input is requested again
after each error.
When admins choose 1, admins can add new car records to the car rental system.
Selecting options other than “YES” and “NO” will results in error message. When
admins enter “YES”, admins will get an auto-incremented car ID. Then admins will need to
insert the details of the car like car brand, car model, car plate, manufacture year, status and
price. The price only accepts numeric value, the example above “RM190” is unacceptable
whereas entering 190 proceeds to complete insertion. After that, admins can decide to choose yes
or no again to insert a new car data.
The new car details are added to the end of “carDatabase.txt” file.
If admins select “NO”, the system will display all the car data. After displaying all the
cars, the system will proceed to return to the administrator main screen again. Which admins can
select their actions once again.
When admins select 2, admins will get all the car data display in an arranged manner. By
looking at the list of the cars, admins can choose one of the car details to modify the details in it.
To change a car details, admins must enter the desired line of data displayed by the system.
The line of statement the admins can select is only the lines in the available range from
the 1st displayed car to the last car. For instance, 100 and “ninety-four” above face error as the
available last car is lesser than 100 and only allowed numeric value. While 94 is a valid input as
it is in the range, admins can proceed to modify the details. Admins must choose the data type
they want to modify like status, car plate etc. After selecting a data type, the system will display
the original word and request the admins to enter the replace word. After these actions, the car is
modified, and the line of car details will be display with the modified version again. After that,
admins select “YES” to continue modification or select “NO” to return to the administrator
main screen.
The specific detail of the cars is being updated in the “carDatabase.txt” file.
Inserting other input than “YES” or “NO” is not allowed. Users can select “YES” to
continue modify car details and select “NO” will be directly return to the administrator main
screen.
Selecting options other than number 1 to 6, admins will get an error message and is
required to insert their choice on data type display again. As shown above, selecting “one” and 0
result in error message and each of it is followed with choice option request once again.
Selecting 4 can display customer payment for a specific time duration. Start date and end
date are requested to display the car rent date between that timeframe. The date does not accept
month value more than 12 or smaller than 1. If admins insert the date which is not in
DD/MM/YYYY format such as “2019-09-88” in the example, admins will get an error message
and the date will be requested again.
By inserting a valid start and end date, the system will display the customer booking /
payment statement requested rent date which is between the start and end. For instance, all
booking / payment statements with requested rent date between “01-04-2021” and “20-04-2021”
are displayed as requested by admins.
Selecting 5 will display all the customer username arranged alphabetically.
After displaying the data (from option 1 to 5), admins will be shown with a redirection
menu either they want to return to the display menu or return to the main screen. Selecting
options other than 1 or 2 will results in an error message and option for redirection is requested
again. Selecting 1 admins will be return to the display menu again to display more dataset. When
admins select 2, admins are redirected to admin main screen which they can reselect their actions
again.
In the functionalities menu, admins select 4 to search for specific records in either
customer booking or customer payment. After selecting 4 in the menu, admins will be displayed
with a database option menu, 1 for Customer Booking and 2 for Customer Payment.
On the search menu, admins can only select 1 or 2, other options will result in error
message and admins will need to select their option again.
● Customer Booking
By selecting 1, admins can search either username, car ID or days in the customer
booking records. The data types that users can search are username, car ID and days. Selecting
other data types will result in an error message and the data type is requested again.
Keyword: Vandyck
Keyword: R001
Keyword: 5
After every valid search results, admins will be asked to choose their desired redirection.
When there are no relevant data on the specific keyword, admins will get a “There is no
relevant data …” message and will select “YES” continue searching or select “NO” to return to
administrator main screen. An incorrect input will provide an error message, users are requested
to choose again.
● Customer Payment
Selecting 2, admins can search in customer payment statements. Then, admins will
receive options to choose the data type to search for a keyword. The system only accepts data
types like username, car ID and days. Selecting options other than available data types will result
in error message and the data type input is requested again.
Keyword: Cheryl
Data type: Car ID
Keyword: R033
Keyword: 10
After every valid search results, admins will be asked to choose their desired redirection.
When there are no relevant data on the specific search phrase, admins will be displayed
with “There is no relevant data …” message. Then, admins can choose “YES” to continue their
search for booking / payment statement again or “NO” to return to administrator main screen.
Selecting other options, admins will receive error message and the option is requested again.
● Admins search redirection
The redirection menu provides choice 1 for Search Menu and 2 for Administrator Main
Screen. Options other than 1 or 2 will result in error message and admins’ choice is requested
again.
Selecting 1 in the redirection menu, admins can continue searching for input by selecting
the desired database.
Selecting 5 in the functionalities page, admins can return a rented car back to the system.
This action is required when the customers’ rent duration had ended for a particular request.
After choosing 5, admins will receive a list of rental statements that are required to be mark
ready.
Then, from the list of statements, admins can select from the range of available line
number. Non-numeric value and number out of available range will be result in error message
and their option is requested again. While choosing a valid line, admins will receive a returned
rent statement on their selection with updated data. After that, admins will need to choose
“YES” to continue return rented car or “NO” returning to the administrator main screen.
By selecting 6 in the admins’ functionalities page, admins can mark a car as ready
whenever a car is prepared to be claim upon customers’ booking confirmation. This functionality
enables admins to arrange the sequence for which customer will get to rent the car first.
Then, admins can choose from valid statements to mark the specific car as ready for the
customers’ statement. Entering a non-numeric value or options not available in the range of
statement list, admins will be displayed with an error message and line statement request is
requested again. When admins select a valid statement, admins will see a marked ready
statement which is updated based on their choice. Then, admins must select “YES” to navigate
for marking more cars as ready or “NO” return to the administrator main screen. Selecting other
options, admins will receive error message and will need to choose the option again.
Customer booking / payment statement status is being changed from ‘In Queue’ to ‘Ready’ in
“customerBookingPayment.txt” file.
Admins select 7 in functionalities main screen to inspect the car rental system data
analytics dashboard. The dashboard is decorated with a banner and admins can see the total cars,
total customers, total rental statement (booking / payment), total profits, highest profits and
lowest profits. After displaying all these data, admins will get a “Keep up your great
work!” :thumbsup: emoji message and automatically return to the admin main screen.
1.3 Normal Customers / Visitors
After selecting 2 in the welcome page, customer will be displayed with the normal
customers (visitors) interface. Visitors have three unique action steps and one exit system action.
Options other than number from 1 to 4, customers will get an error message and are
required to key in their choice again.
1.3.1 View all available to rent cars
Selecting 1 will view all cars with ‘Open’ status which is available for rent. After all cars
displayed, customers will get to see a redirection menu.
1.3.2 Customer Registration
After inserting a valid username and password, visitors will need to fill in more details
like address and phone number to complete their registration. After filling in these details,
visitors will see information about their balance, recharge notice and complete registration
message. Then, automatically visitors are redirected to the visitor menu page and can now login
as a registered customer.
The newly added / registered customer details are appended to the “customerDetails.txt” file.
1.3.3 Customer Login
Selecting 3 in the visitors’ menu, customers can login with their registered account to
access more features in the car rental system.
To login the system, customers will need to insert their username and password.
Customers are given three attempts to enter their credential username and password. In every
attempt, customers are required to insert their username and password. If the username and
password does not match or invalid, customers will be asked whether they have an account. If
they choose “YES” the attempts with continue to attempt 2 and this will go on till attempt 3
when the wrong credentials are keyed in.
After three attempts, customers will be removed from the login transaction and return to
the visitor page.
While if customers select “NO” in the option of “Do you have an account?”, customers
will be given choice to decide whether they wish to register a new account or not.
Selecting “YES” on wish to register, customers will be redirected to the customer
registration page. Selecting “NO”, customers are redirected to the customer landing page.
In the visitors’ redirection menu, visitors can choose from number 1 to 4. Options other
than number in range 1 to 4 will receive an error message and the option is requested again.
Selecting 1, customers will be returned to the Selecting 2, visitors can login to the system to
visitors’ menu. access the registered customers’ functionalities.
Selecting 3, visitors can register an account in Selecting 4 to exit the system.
the
car rental system.
1.4 Registered Customers
After inserting customers’ valid credential username and password, customers will be
provided with a customer functionalities menu. The menu contains seven unique actions and one
exit system choice. The menu does not accept any nonnumeric value and number other than 1 to
8. When wrong inputs are inserted, customers are requested to insert their choices again after
getting an error message.
After all cars displayed, customers can choose to proceed on booking a car or return to
customers functionalities menu. Selecting options other than 1 or 2 will receive error message
and requested to reselect their option again. Selecting 1 will proceed to customer booking.
Selecting 2 will return customer to functionalities menu.
Then, customers are allowed to change their password, address and contact number.
Options other than available choices will result in error message and username is immutable in
the system, customers are prohibited to modify their username.
When customers choose from password, address and contact number, customers will be
displayed with original data and are required to insert their desired replace information. Then
after replaced, customers will be displayed with modified details. Customers will need to decide
on “YES” for continue modification or “NO” to navigate back to customer functionalities menu.
Changes in database file
The address detail of customer “Vandyck” had been changed from ‘Johor Bahru’ to ‘Melaka’ in
“customerDetails.txt” file.
After selecting 3 in the functionalities page, customers will be asked to insert their
username to display all rental history. Then, automatically customers will be redirected to
functionalities page.
When customers insert a username that does not registered in the system, they will get
“There is no such customer…” message.
😊
When the username is registered but there is no rental history, customers will get “The
rental history is empty” message. Automatically, customers will be returned to the functionalities
page.
Selecting 4, customers can book a car in the system. After the selection, customers will
be displayed with all the available to rent cars. Then, customers can select one of the car by
choosing the line of statement to book the car.
Non-numeric value and number out of the available range will result in error message and
the line statement is requested again. When customers select a valid line of car, customers are
requested to fill in their username and choose how many days they want to rent the car. After
that, customers will receive messages of booking is request but not confirm yet and redirection to
customer functionalities. Then, customers will see the functionalities page and they can choose
option 5 to pay their booking confirmation.
Selecting 5 in the functionalities page, customers can pay their car to confirm their
booking.
To access the booking system, customers are required to insert their username to display
all the booking the customers currently have in their account that are pending for payment. From
the available list, customers can select one of the booking statements to be paid by entering the
line of statement correspond to the booking record.
Selecting options other than the valid range of line statement, customers will receive an
error message and the option is required again.
By selecting a valid choice of line, customers can choose a payment type either credit
card or balance to make their payment. Selecting other option will receive an error message
and payment type is requested again.
Selecting “credit card”, customers are required to insert credit card number, cvv and
expiry date. Then, the transaction is completed, and customers are required to choose their
desired rent date in DD/MM/YYY. Automatically, customers are redirected to customer
functionalities page.
Changes in database file
The booking statement is now “Paid” and reservation “In Queue”, payment method “credit
card”, desired rent date “11/11/2021”. This record is updated in “customerBookingPayment.txt”
file.
Selecting “balance”, if the customers’ balance is lesser than the total amount required to
paid, customers will get “You balance is insufficient” message. Automatically, customers will be
redirected to the balance top up system. When the balance is sufficient to pay the booking
statement, customers can insert their desired rent date upon their success transaction. After that,
customers will be redirected to customer functionalities page.
Statement’s status is modified to ‘Paid’, reservation ‘In Queue’, payment method ‘balance’ and
desired rent date ‘12/07/2021’ in “customerBookingPayment.txt” file.
1.4.6 Top up balance
Selecting 6 in the functionalities page, customers can top up their balance in the system
and are displayed with the “Welcome to the top up system” banner after selection.
After the banner, customers are required to insert their username to access their private
data like balance. Customers are displayed with their current balance in the system, then they can
decide on which payment method to top up their balance. Selecting options other than 1 or 2,
customers will get error message and they are required to choose their option again.
● Credit / debit card top up
Selecting 1 in the payment method, customers will see “Top up with credit / debit card”
banner. Customers are requested to insert the card number, cvv, card expiry date and top up
value. Then, they will receive a “Top up success…” message.
Selecting 2 for FPX online banking, customers will be displayed with “Top up with: FPX
online banking” banner and are required to choose a merchant to top up their balance. Select
options other than number from 1 to 5, customers will receive an error message and are
requested to insert their option again. By selecting a valid merchant, customers are proceeded to
insert their bank account number and the password. After that, customers can insert a top up
value which is then being displayed with the top up balance.
The balance of customer “Vandyck” had been updated from 50 to 110 in “customerDetails.txt”
file.
After a successful top up attempt, customers will need to decide on their redirection.
“YES” to continue top up, “NO” to return to the functionalities menu. Other options will result
in error message and the option is requested again.
1.4.7 Claim car
Selecting 7 in the functionalities page, customers can claim a car that had been marked as
ready by the admins upon their booking confirmation.
Customers will get a list of rental cars that are ready to be claimed after inserting their
username. After that, customers are required to insert a valid line statement selection to claim the
car. Selection out of range and non-numeric value will face error message and are requested to
choose again. If it is valid, customer will receive claimed car statement notice and need to decide
on their redirection, “YES” to continue claiming cars or “NO” to return to the customer
functionalities menu.
When there are relevant data, customers “There is no relevant data” message and will be
redirected to the customer functionalities menu.
Admin Custome
s rs
Visitor
s
To exit the system, admins and registered customers can select 8 in the functionalities
menu. Selecting 4, visitors can exit the car rental system. After choosing the exit system option
on users’ respective menus, users will need to confirm their action on either ending the program
or returning to the welcome page as sometimes users might access exit system by accident.