Problem

Design a Python program that simulates a smart parking management system for a small parking lot. The system should track vehicles entering and leaving the parking lot, calculate parking fees, and display available parking spaces.

Requirements

  1. The parking lot has a fixed number of spaces (for example 20 spaces).
  2. Each vehicle has:
    • License plate number
    • Entry time
    • Exit time
  3. When a vehicle enters:
    • The system records the license plate and entry time.
    • It assigns the vehicle a parking space.
  4. When a vehicle exits:
    • The system calculates the total time parked.
    • Parking fee rule:
      • First hour: $5
      • Every additional hour: $3
  5. The system should allow the following actions:
    • Park a vehicle
    • Remove a vehicle
    • View all parked vehicles
    • Show number of available spaces
    • Display total revenue collected

Technical Requirements

  • Use classes (Object-Oriented Programming).
  • Use a dictionary or list to store parked vehicles.
  • Handle errors such as:
    • Parking when the lot is full
    • Removing a car that is not parked

Bonus Features (Optional but recommended)

  • Save parking records to a file.
  • Allow searching for a car by license plate.
  • Display a simple menu system in the terminal.
  • Add different parking rates for cars, bikes, and trucks.

Example Menu

  1. Park Vehicle
  2. Remove Vehicle
  3. View Parked Vehicles
  4. Show Available Spaces
  5. Show Revenue
  6. Exit

This assignment tests:

  • Python logic
  • Object-oriented programming
  • Data structures
  • Real-world problem solving.

WRITE MY PAPER


Leave a Reply