Activity Diagram for the Parking Lot

Create some activity diagrams for the parking lot problem.

An activity diagram is a great way to visualize the flow of messages from one activity to the other in the system. There can be different activity diagrams that we can create for our parking lot system. For this lesson, we will create activity diagrams for the following two activities:

  • The vehicle entering the parking lot

  • Activity challenge: Customer pays the parking ticket

Vehicle entering the parking lot

The following are the states and actions that will be involved in this activity diagram.


Initial state: The customer enters the parking lot.

Final state: There are two final states present in this activity diagram, shown below:

  • The customer receives the parking ticket through the system.

  • There is no parking slot vacant, so the customer is denied access to the parking lot.


The customer arrives at the parking lot entrance and selects their vehicle type. They are assigned their dedicated parking spot according to their select vehicle type. The parking lot then informs us about the availability of that parking spot and allows access accordingly.

Based on the order above, the activity diagram of a vehicle entering a parking lot is given below.

Note: Here we assume that only a car can be parked in the handicap spot. Access is only available if the car has a disabled person card present.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.