Description
Write a program for calculating the money earned in a parking area. The parking area can take up to 20 vehicles. Vehicles’ type can be “small”, “medium” or “large”. Small vehicles pay 5TL if they stay up to 2 hours. If they stay longer, they pay 1TL for each hour. Medium vehicles pay 6TL up to 2 hours and then they pay 2TL for each hour after 2 hours. Large vehicles pay 7TL for the Frst two hours and then they pay 3TL for each additional hour. The program runs as below. ±irst the user chooses one of three options:1: Enter Vehicle2: Exit Vehicle3: TerminateThe program continues until the user wants to terminate the program. Enter Vehicle: In there are already 20 vehicles inside the parking area, the program gives a warning and asks to chose another option. Otherwise,the program asks the plate, type and the entrance hour of the vehicle and saves the vehicle to the array.Exit Vehicle: The program asks the plate of the exiting car and Fnds it in the array. Then the program asks the exiting hour of the car and calculatesthe total money that the car should pay. Also the program deletes the car from the array. Terminate:The program prints the total money earned in the parking area and exits.The user will not enter any incorrect data (i.e. trying to exit a car which is not in the parking area) so the programmer does not need to make any error check. There is an example execution of the program. To help to the user, the cars inside the parking area are listed at every option selection. Also, to beable to save some space, the maximum number of the cars is limited to 3 instead of 20