Design the software for a multi-level parking lot. Drivers arrive in a motorcycle, car or truck, get a ticket at the gate, park in a free spot that fits, and pay when they leave.
It must
- The lot has several floors, each with spots of different sizes (motorcycle, car, truck).
- On entry, find a free spot that fits the vehicle and issue a ticket.
- On exit, work out the fee from the time parked and free the spot.
- Say clearly when the lot is full for a vehicle type.
- Pricing rules (hourly, flat) must be changeable without touching the parking logic.
Keep in mind
- Two vehicles must never be given the same spot, even when two gates work at once.
- Start with one lot in one building. Many sites are a follow-up.
- Payment itself (cards, UPI) is out of scope: the design only produces the fee.