---ParkingSpot---
ParkingSpot(){
// gets uniqueId to label new spot
// uniqueId allows us to find where the spot is
}
getParkingSpotType(&VehicleType, &uniqueID)
removeSpot()
modifySpot() // may modify its type
isOccupied()
---ParkingFloor---
ParkingFloor() {
// get uniqueId for floor
}
getFreeSpots(VehicleType)
getFreeSpots()
getParkingSpot(int uniqueId)
getDataforInfoPanel() // stringifies spots for info panel
RemoveFloor()
// has map containing all parking spots on floor
// has unique identifier for this parking floor
--Ticket--
getStatus() // paid? unpaid? Lost? corporate?
totalDue()
// has unique identifier to identify transaction
// has entry/exit time.
// Maybe customer info too
--Management--
LogOn(Username, Password)
getParkingLot() // returns reference
// Management has ability to make changes to the
// lot, floor, spot.
--TicketIssuance--
GetTicket()
// ticket issuance is handled by a separate thread that wakes up and only does getTicket requests
--Transaction--
doTransactionCard(Ticket)
doTransactionCash(Ticket)
// card transactions may be separate tasks handled by a thread pool. Each card company has its own transaction handler and some companies may be faster than others or offline and online. Each card transaction is a task handled concurrently
--ParkingLot---
getParkingFloor(id) //reference
getParkingSpot(id) // reference
addParkingBooth(&id)
removeParkingBooth(id)
modifyParkingRate(val)
addEntry(&id)
removeEntry(id)
addExit(&id)
removeExit(id)
updateInfoPanel()
Transact()
getParkingLotId()
--System--
// Has multiple ParkingLots
getParkingLot(id)
addParkingLot(&id)
removeParkingLot(id)
AddManagement()
RemoveManagement()
Defining the system data model early on will clarify how data will flow among different components of the system. Also you could draw an ER diagram using the diagramming tool to enhance your design...
The main uses for this sytem are customers and management
Explain how the request flows from end to end in your high level design. Also you could draw a sequence diagram using the diagramming tool to enhance your explanation...
Dig deeper into 2-3 components and explain in detail how they work. For example, how well does each component scale? Any relevant algorithm or data structure you like to use for a component? Also you could draw a diagram using the diagramming tool to enhance your design...
Parking Lot
Parking Floor
Parking Spot
System
Explain any trade offs you have made and why you made certain tech choices...
Try to discuss as many failure scenarios/bottlenecks as possible.
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?