Activity Diagram for the Parking Lot
Create some activity diagrams for the parking lot problem.
We'll cover the following...
An activity diagram is a great way to visualize the flow of messages from one activity to another 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 enters 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.
States
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 vacant parking slot, so the customer is denied access to the parking lot.
Actions
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.
The activity diagram of a vehicle entering a parking lot is given below based on the order above.
Note: Here, we assume that only vehicles displaying a valid disability permit can park in the designated accessible spot.