Project post-mortems to illustrate OOP design principles in action

Let me start by saying that the Mastermind and Battleship projects have been fun to work on and good for getting my feet wet with OOP basics through bite-sized problems. However, it’s one thing to implement getters and setters because the specs tell us to do so. It’s another thing to know how to design a well-encapsulated class and determine which of its attributes to make accessible from the outside. I’m not super confident I’d know how to code a class-based project from scratch without specs to guide me.

I think it could be helpful to include project “post-mortems” (I wish there were a better term for that) after or as part of each walkthrough. These could explain the “why” behind the class design, choice of getters and setters, rationale for class vs instance methods, etc. They might even demo how a program would behave differently (or not at all) if just one method were omitted. This could be helpful for visualizing how each method fits into the whole, and how one class connects to another. Ultimately, all of this could illustrate how the project solutions put into practice abstract OOP design concepts like encapsulation and abstraction. Maybe this is suitable for a more advanced stage of the course (crawl then walk, and whatnot), but I just thought I’d suggest it!