This question already has an answer here:
I have been learning C# and am trying to tackle some common projects / works of my own to become even better. Currently I am working on understanding the Mars Rover Problem. I read the description and have seen several solutions, they seem nice and follow the principles of OO design.
- How do you come to understand what classes you need to make for a project?
- Is there a book I can read to grasp the concept of OO design better?
I understand in theory, but I just don't get how and what I would do when actually given a problem.
For instance I see the Mars Rover problem and instantly in my head I think Ok I can get that done with just 3 classes, a Rover, Grid and a CommandCenter class. Then I look at online examples and there are a lot more classes, interfaces and overall breakdown.