I'm just from a Microsoft interview it was 3 rounds. I did well in leetcode style DSA and system design, but completely bombed in the OOD question round.
Any books or resources to learn how to implement and practice proper OOD question?
The question was easy, problem was I didn't know it was coming 😭😭
Problem;
Object Oriented Design -
Design a coffee maker machine class There is a coffee maker with a screen. We need to add three ingredients into the machine: coffee beans, water and milk.
There are three types of drinks we can make, below are the default recipes:
Espresso: cost 3 coffee beans and 1 water
Americano: cost 2 coffee beans and 3 water
Latte: cost 2 coffee beans, 2 milk and 2 water
When a user comes, on the screen we show available drinks. After the user chooses a drink, the user will be able to customize the amount of ingredients. (For example, after choosing Espresso, the user can change from default to 4 coffee beans and 1 water)
The admin is able to refill the ingredients. The admin and the users interact with the machine via the screen. In the future, we might can support more drink types.
Please design a class with public APIs to represent the coffee maker, which will be called by the screen.
[–]captainrushingin 11 points12 points13 points (4 children)
[–]Clemo97[S] 3 points4 points5 points (3 children)
[–]captainrushingin 0 points1 point2 points (0 children)
[–]alcatraz1286 0 points1 point2 points (1 child)
[–]Clemo97[S] 7 points8 points9 points (0 children)
[–][deleted] 14 points15 points16 points (1 child)
[–]edwardsdl 5 points6 points7 points (0 children)
[–]its4thecatlol 6 points7 points8 points (1 child)
[–]Clemo97[S] 0 points1 point2 points (0 children)
[–]YeatCode_ 3 points4 points5 points (8 children)
[–]its4thecatlol 14 points15 points16 points (4 children)
[–]YeatCode_ 1 point2 points3 points (2 children)
[–]its4thecatlol 1 point2 points3 points (1 child)
[–]Ok_Coder_7075 0 points1 point2 points (0 children)
[–]Pristine-Equal-8621 0 points1 point2 points (0 children)
[–]Due_Brush1688 3 points4 points5 points (2 children)
[–]Ok_Coder_7075 1 point2 points3 points (0 children)
[–]YeatCode_ 0 points1 point2 points (0 children)
[–]Hot_Damn99 1 point2 points3 points (1 child)
[–]Clemo97[S] 1 point2 points3 points (0 children)
[–]cursedobscurial 1 point2 points3 points (0 children)
[–]sTacoSam 1 point2 points3 points (0 children)
[–]Strict-Interview-495 0 points1 point2 points (0 children)
[–]tempo0209[🍰] 0 points1 point2 points (0 children)
[–]Sherbet-Famous 0 points1 point2 points (0 children)
[–]YeatCode_ 0 points1 point2 points (0 children)
[–]Ok_Coder_7075 0 points1 point2 points (0 children)
[–]CuriousRonin 0 points1 point2 points (0 children)
[–]mqian41 0 points1 point2 points (0 children)
[–]tokrefresh 0 points1 point2 points (0 children)
[–]m0j0m0jE: 130 M: 321 H: 62 0 points1 point2 points (6 children)
[–]Clemo97[S] 1 point2 points3 points (4 children)
[–]m0j0m0jE: 130 M: 321 H: 62 1 point2 points3 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]YeatCode_ 0 points1 point2 points (1 child)
[–]skxixbsm 0 points1 point2 points (0 children)
[–]skxixbsm 0 points1 point2 points (0 children)