Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What is expected from something like "model a parking garage in code?"

Something like a garage class that has properties like numberOfCars, maxAmountofCars, maxHeight and methods for insertCar(), removeCar(), isGarageFull() ?



Probably that and, I don't know, maybe modeling a Car class and various subtypes that inherit from it?


Probably keeping track of how many parking spots are available as cars enter/exit, and denying entrance if you're full up.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: