Grokking the Object Oriented Design Interview
Vote
0% completed
Finding the Classes
You have a list of ten requirements. You need a list of classes. There is no formula that turns one into the other, but there is a reliable method, and it takes about ten minutes.
The method has three parts. Collect candidates, cut the ones that are not classes, then give each survivor one job.
Start from the nouns
Read the requirement list and underline every noun. For the parking lot that gives you a long list.
- parking lot, floor, spot, compact spot, large spot
- vehicle, car, van, truck, motorbike
- customer, attendant, administrator
.....
.....
.....
Like the course? Get enrolled and start learning!