Tuesday, September 12, 2017

Design a parking lot

  • Vehicle
    • size of vehicle (small, medium, large)
    • status of vehicle (run or parked)
    • findSlot()
    • park()
    • leave()
  • Car, Bike, Bus, Truck... extends Vehicle
  • Slot
    • size of slot
    • status (available or not)
    • occupy()
    • release()
  • ParkingLot
    • hold slots in parking lot
    • totalSlots()
    • occupiedSlots()
    • availableSlots()




    No comments:

    Post a Comment