System requirements


Functional:

If there is space remaining in the parking lot, a person should be allowed in to park there

If the lot is full, then the person should not be allowed to park in the lot

The parking lot should assign the next available space to the person entering the lot

Each person should be able to enter and exit the lot without obstruction. No cars should block another


Non-Functional:

List non-functional requirements for the system...

The parking lot should prevent people who are not parked there from entering to prevent any malicious actors from doing anythng to damage the cars therein

The parking lot should be available 24 hours a day



Capacity estimation

Estimate the scale of the system you are going to design...

The parking lot should be big enough to handle the volume of cars coming in.. It should not cost too much or take up too much space. Let's say a median space of 500 cars.

Let's assume that at slow times of the day there will be 40 cars entereing and exiting every hour.

At high traffic times, let's say there are 100 cars entering and only 20 cars exiting

After the high traffic times, the cars will be exiting more than enter




API design

Define what APIs are expected from the system...

checkIfAtCapacity()

addCar(car)

removeCar(car)

findCarPosition(car)

findNextFreePosition()




Database design

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...

Parking_Spaces

----------------

Id: int

Row: Int

Column : Int

Floor: Int

Car ID: foreign Key to car


Car

---

int: ID

owner: string

make: string

model: string





High-level design

You should identify enough components that are needed to solve the actual problem from end to end. Also remember to draw a block diagram using the diagramming tool to augment your design. If you are unfamiliar with the tool, you can simply describe your design to the chat bot and ask it to generate a starter diagram for you to modify...







Request flows

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...






Detailed component design

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...






Trade offs/Tech choices

Explain any trade offs you have made and why you made certain tech choices...






Failure scenarios/bottlenecks

Try to discuss as many failure scenarios/bottlenecks as possible.






Future improvements

What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?