Requirements
Functional Requirements:
• The system must allow cars to enter through an automatic gate.
• The system must print a ticket at the entrance with date and time.
• The system must record the parking duration of each vehicle.
• The system must calculate the parking fee based on the time spent.
• The system must allow users to pay before exiting.
• The system must open the exit gate after payment.
• The system must show whether the parking lot is full or available.
Non-Functional Requirements:
• The system must open the gates quickly.
• The system must work reliably without frequent errors.
• The system must be easy for users to use.
• The system must ensure payment data security.
- The system must work correctly even with many cars at the same time.
API Design
Define the APIs expected from the system. This is your chance to analyze and define the read and write paths so that you can come up with the high-level design...
High-Level Design
• Entrance Gate System → prints tickets and allows cars to enter.
• Parking Management Server → manages tickets, parking spots, and payments.
• Database → stores tickets, payments, and parking information.
• Payment System → handles card or cash payments.
• Exit Gate System → verifies payment and opens the gate.
Flow:
Car → Entrance Gate → Server → Database → Payment → Exit Gate
Detailed Component Design
Ticket System
• Generates a unique ticket ID.
• Stores entry date and time in the database.
• Connects the ticket to the vehicle session.
Payment System
• Calculates the parking fee based on parking duration.
• Verifies if the payment is successful.
• Sends confirmation to the exit gate system.
Gate System
• Controls entrance and exit barriers.
• Checks if the ticket is valid and paid.
• Opens or keeps the gate closed depending on the result.