In OO design interviews, how do you approach the problem? Do you draw out any use case or class diagrams? Do you just write some notes and go straight to code? Just curious.
Question recently asked was:
Design a coffee maker. It can serve 3 drinks ( latte, frap, coffee ). You can ask it what types of coffee does it serve. It also can display when it needs to be serviced.
In hot drink you should create shared variables and methods you want to be shared with other hot drinks.
2. the coffee machine should be based on the factory design pattern and create the drinks.
The factory should contain an arraylist of all drinks they serve or even better an ENUM.
It should also contain a date variable and status variable.
That's basically it in a nut shell.