Stage 2 of 8 · 8 lessons · ~5 weeks
Object-oriented programming and design
Classes, the four pillars, composition and the SOLID principles at an introductory level. The goal is code that is easy to change, not a list of definitions for the exam.
Start: Classes, objects and responsibilitiesLessons· one lesson for each topic, in this order
Do this
- Model one real problem on paper: classes, responsibilities and relationships, before writing any code.
- Build it in the language your course uses, with private fields and methods that protect its rules.
- Replace one `if type == ...` chain with polymorphism.
- Replace one inheritance relationship with composition and note what got simpler.
- Write one before and after example for each SOLID principle in your own notes.
- Implement Strategy and Observer once each in a small exercise.
- Ask a classmate to add a feature to your program and note which parts they had to change.
Start with· follow one of these
- CoursePaidGrokking SOLID Design Principles
Design Gurus · Beginner · $50 one-time
Each SOLID principle with a broken example and its fix, at a beginner-friendly pace
- CourseFreeJava Programming MOOC
University of Helsinki · Beginner
Free, exercise-heavy course whose second half is a thorough, tested introduction to OOP
Keep handy
Also worth your time
Before moving on: A small console program, such as a library or parking lot system, with a one-page class diagram and a short note that points to where you used encapsulation, polymorphism, composition and at least two SOLID principles.

OOP exams reward definitions; jobs reward code that is easy to change. Write the program first, then refactor it twice: once to remove a type switch with polymorphism, once to replace an inheritance chain with composition. That is where the ideas stick.