Sunteți pe pagina 1din 15

Main

Figure 1.0 Main class.

The main class is used to begin the program and take the user to the login page. Once
successful, then main menu class will be accessed through the m object shown above.

Login

Figure 2.1 Login source code.

Base on the figure above, the login works in such that it will only accept if the user inputs
the proper username and password and will display an error if any of the two do not match. A do
while loop is added to ensure that the program continues until the user keys in the proper
credentials.

Figure 2.2 Login output.

The output shows that if either the username or password is incorrect or nothing is
inputted, an error message will appear and the process will repeat until it is successful. Once
successful, it will take the user to the main menu.

Main Menu

Figure 3.1 Main menu options.

A list of available options are displayed to allow the user to quickly navigate between
different functions of the program.

Figure 3.2 Main menu switch case.


A switch case is used to select the options from the main menu which contain objects to
the respective classes of said options.

Registration

Figure 4.1 Registration menu.

Figure 4.2 Registration switch case (1)

Figure 4.3 Registration switch case (2)

Figure 4.4 Registration options (output)

A switch case is used to select the options like the main menu. The check parking
availability options are used to check if the parking spot is taken and if it is, it will display its
details. The assign parking options are used to key in the customers data to book the parking
spot and prevent another customer from taking that spot until the duration is over.

Customer Information

Figure 5.1 Assigning a user to a parking spot.

Figure 5.2 Searching for the parking spot.

This allows the users to first check if the parking spot is taken and if not it will proceed to
get the customers information.

Figure 5.3 Customer data inputs to be entered.

The customers data is entered one by one and then stored into then necessary file to be
viewed, edited and deleted at a later time.

Figure 5.4 Customer information through check availability.

Figure 5.5 Parking availability using for loop.

A for loop is used to cycle between the files and search for the keyed in parking spot and
retrieve its information.

Updating

Figure 6.1 Updating customer information.

Figure 6.2 Overwriting old data with updated data.

The parking officer can update the customers contact number, car number, and
email through the update class. Besides that, a date showing when the customer had updated
their data will also be listed if there is any.

Deletion

Figure 7.1 Deletion menu.

Figure 7.2 Deletion input and confirmation.

Figure 7.3 Deletion switch case.

Figure 7.4 Deletion file detection and removal.


The file is searched through parking space and then a confirmation message is
followed to confirm the deletion of the customers data.

File Reader/Writer

Figure 8.1 File reading.

Reads files that have been created.

Figure 8.2 File Writing.

Creates files to be written to.

S-ar putea să vă placă și