diff --git a/website/docs/lld/parking-lot.md b/website/docs/lld/parking-lot.md new file mode 100644 index 0000000..391bf71 --- /dev/null +++ b/website/docs/lld/parking-lot.md @@ -0,0 +1,45 @@ + + +# Designing Parking Lot + +In this artile we will design a parking lot and see its variations as asked in an interview. + + + +##### Functional Requirements + +1. Customers can collect a parking ticket from the entry points and can pay the parking fee at the exit points on their way out. +2. Customers can pay the tickets at the automated exit panel or to the parking attendant. + +3. Customers can pay via both cash and credit cards. +4. Customer can pay online in the portal. +5. System should support parking for different types of vehicles. +6. Per hour parking fee model. + +##### Questions to be asked... + +1. Is the parking lot multi floored? + YES +2. What type of vehicles are we targeting at ? + Car, truck, Electric vehicles(support for nearby charging), Scooters, van, Motorcycle +3. Can we pre book our slot for parking ? + Lets keep that for phase 2 (Not now) + + +##### Non Functional Requirements +1. System should not allow vehicles more than the maximum capacity. +2. Multiple entry and exit points. +3. Multiple parking spots i.e Compact, Large, Handicapped, Motorcycle, etc +4. Each parking floor should have a display board showing any free parking spot for each spot type. + +**Note**: Now we have all the things that needs to be done. Lets understand who all are the users of our application. + +1. **Admin**: Responsible for adding/ removing/ updating parking floors, parking spots, entrance, and exit panels and parking attendants. +2. **Customer**: Can get a parking ticket and pay for it +3. **Parking Attendant**: Parking attendants can do all the activities on the customer’s behalf, and can take cash for ticket payment. +4. **System**: To display messages on different info panels, as well as assigning and removing a vehicle from a parking spot. + +#### Use Case Diagram + +![usecase](../../static/img/parking-lot/usecase.svg) + diff --git a/website/static/img/parking-lot/usecase.svg b/website/static/img/parking-lot/usecase.svg new file mode 100644 index 0000000..b847266 --- /dev/null +++ b/website/static/img/parking-lot/usecase.svg @@ -0,0 +1,2 @@ + +
Customer
Customer
Login/Logout
[Not supported by viewer]
Take ticket
Take ticket
Credit card payment
Credit card payment
Scan ticket
Scan ticket
Add parking floor
Add parking floor
Add parking spot
Add parking spot
Add parking attendent
Add parking attendent
Add entrance/exit panel
Add entrance/exit panel
View account
View account
Pay ticket
Pay ticket
Update account
[Not supported by viewer]
Add/modify parking rate
Add/modify parking rate
Admin
Admin
Add parking display board
Add parking display board
<<include>>
<<include>>
Parking attendant
Parking attendant
Cash payment
Cash payment
System
System
Show parking full message
Show parking full message
Show available parking spot message
Show available parking spot message
<<include>>
<<include>>
<<include>>
<<include>>
Assign a parking spot to a vehicle
Assign a parking spot to a vehicle
Remove a vehicle from a parking spot
Remove a vehicle from a parking spot
Add electric panel
Add electric panel
<<include>>
<<include>>
\ No newline at end of file