Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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
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.
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
A list of available options are displayed to allow the user to quickly navigate between
different functions of the program.
Registration
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
This allows the users to first check if the parking spot is taken and if not it will proceed to
get the customers information.
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.
A for loop is used to cycle between the files and search for the keyed in parking spot and
retrieve its information.
Updating
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
File Reader/Writer