We may earn an affiliate commission when you visit our partners.
Andrzej Sz.

Learning syntax of a programming language is not enough to become professional and build high quality software. One must also learn how to make good design and implement it properly so that software is robust, maintainable, flexible and testable. That’s why we need object-oriented design principles like SOLID:

  • Single responsibility

  • Open-closed

  • Liskov substitution

  • Interface segregation

  • Dependency inversion

Read more

Learning syntax of a programming language is not enough to become professional and build high quality software. One must also learn how to make good design and implement it properly so that software is robust, maintainable, flexible and testable. That’s why we need object-oriented design principles like SOLID:

  • Single responsibility

  • Open-closed

  • Liskov substitution

  • Interface segregation

  • Dependency inversion

This is probably the most complete SOLID principles course on Udemy. But it’s also special in that it focuses on C++ programming language, which we use for examples and assignments. And this course covers both theory and practice.

By the end of this course you should

  • Develop an intuitive understanding of all SOLID principles

  • Understand when SOLID principles are needed and when not

  • Learn how to follow SOLID principles in general, regardless of a programming language, using appropriate abstractions and programming patterns

  • Learn how to follow SOLID principles using different C++ language features and idioms

  • Know how to structure C++ projects, test and refactor

However, there should be no illusions about this or any other course. One cannot become a true master of object-oriented design and programming only by completing one or few courses – it takes years of practice. But this course is a good starting point and provides the needed foundations.

So what exactly is covered in the course?

  • Presentations (theory and concepts about the­ principles)

  • Visual analogies from real world (to better understand and remember the principles)

  • UML diagrams (mainly class diagrams with examples about the principles)

  • Plenty of stand-alone code examples (at least a few for each principle)

  • Almost a real-world project (server application that receives over TCP connection and processes tax reports in JSON or XML formats) with unit and high-level tests

  • Explanations how to install the project’s dependencies, compile it and run tests (uses C++17, CMake, Boost libraries (asio, program options, etc.), Google test)

  • Quizzes and final test (some have additional code examples)

  • Programming assignments (work on the project, etc.)

This course is for you if you

  • Are a beginner or intermediate C++ programmer (but not complete beginner)

  • Have a basic understanding of OOP (classes, polymorphism, inheritance, encapsulation, etc.)

  • Want to learn more and become a better software engineer

Ideally, before this course you should have already worked on a few small hobby projects or have some commercial software development experience.

You should be able to pick up the rest of the materials and technologies during the course. At the same time, some applied technologies and examples are more advanced but optional to the main subject of this course.

And even if you don’t primarily program in C++, you will still find that most of the code examples, as well as the principles, apply to many other programming languages.

What is expected from you?

Besides watching lectures and/or reading presentations, it’s expected that you

  • Compile, read and understand code examples and the project source code (ability to read and work with somebody else's code is very important and often underestimated)

  • Refactor some of the provided code examples while doing assignments

  • Work on the project source code in the final assignment, extend its functionality and add tests

The images in visual examples are from website pixabay and the audio in videos is from website bensound.

Enroll now

What's inside

Learning objectives

  • Discover how to design and write robust and maintainable object-oriented code
  • Develop an intuitive understanding of solid principles
  • Learn how to follow solid principles using appropriate abstractions and programming patterns
  • Learn how to follow solid principles using different c++ language features and idioms
  • Know how to structure c++ projects, test and refactor object-oriented code
  • Practice solid principles and c++ in assignments and final programming project (c++17)
  • Learn how to use cmake and boost libraries in c++ projects
  • Learn how to use google test for unit testing
  • Get acquainted with uml (class and sequence diagrams)

Syllabus

In this section students will (a) gain basic understanding of what SOLID is and (b) be introduced to the materials and programming project used later in this course.
Read more
What is SOLID
Why focus on C++
Repository, presentations, source code, tests, CI
Project description with sequence diagram
Project source code overview before SOLID
Project source code overview after SOLID
Additional remarks about project
Test introduction
In this sections students will learn how to clone the repository, install its dependencies, compile source code and run tests on Windows and Linux.
Windows: download and open project
Windows: install MinGW distro (gcc, g++, boost libraries, etc.)
Windows: install CMake
Windows: install gtest and gmock
Windows: compile project and run unit tests
Windows: run high-level tests (optional, using Python3)
Linux: dowload and open project
Linux: install dependencies
Linux: compile project and run unit tests
Linux: run high-level tests (optional, using Python3)
At the end of this section students will be able to understand what UML is, when it's used, what types of diagrams it has, and how to create class diagrams in Umbrello.
UML introduction
Class diagrams
Creating class diagrams with Umbrello
Test UML basics
At the end of this section students will understand what SRP is, why it’s important, how to apply it and refactor code so that it’s compliant with SRP.
Introduction
How to follow
Run-time concept idiom (advanced)
Visual analogy
UML class diagrams
Project source code before applying OCP
Text editor example violating SRP
Plant care example violating SRP
Practicing SRP
Plant care example refactored
Project source code before applying SRP
Project source code after applying SRP and refactoring
Test SRP
At the end of this section students will understand what OCP is, when and why it’s important, how to apply it using using different C++ language features, techniques, idioms and programming patterns.
Additional remarks
Dynamic polymorphism and inheritance
Static polymorphism and templates
Template specialization
Constraints and concepts (C++20)
Decorator pattern (dynamic)
Decorator pattern (static)
Template method pattern
Composition over inheritance
Project source code after applying OCP and refactoring
Test OCP
Practice OCP
Liskov Substitution Principle (LSP)
LSP introduction
LSP underlying terminology and concepts
LSP implications
How to follow: IS-A relashionship and behavioural subtyping
How to follow: design by contract (invariants, preconditions, postconditions)
How to follow: language features to state and verify contracts
UML class diagram
Classic example
Animal example
Covariance example
Queryset example
Collection example
Project source code changes (OCP + LSP)
Test LSP
Interface segregation principle (ISP)
Implications
UML diagrams
UML diagrams continued
Classic door example (violating ISP + LSP)
Classic door example continued (delegation, adapter, multiple inhertance)
Printer class example (multiple inheritance)
Multiple inheritance caveats
Plant care example (ISP + LSP)
Practice ISP
Plant care example continued (follow ISP + LSP, multiple inheritance, threads)
Project source code changes (new functionality + ISP)
Test ISP
Dependency Inversion Principle (DIP)
Introduction continued
Classic lamp example
Observer pattern example
Observer pattern example continued
Plant care example
Project source code

Save this course

Save SOLID C++ to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in SOLID C++ with these activities:
Review Object-Oriented Programming (OOP) Concepts
Reinforce your understanding of OOP principles, which are foundational to SOLID design. A strong grasp of OOP will make understanding the motivations and benefits of SOLID much easier.
Show steps
  • Review the definitions of classes, objects, inheritance, polymorphism, and encapsulation.
  • Practice writing simple classes and objects in C++.
  • Study examples of inheritance and polymorphism in C++.
Review 'Clean Code: A Handbook of Agile Software Craftsmanship'
Learn practical coding techniques that align with SOLID principles. This book provides a strong foundation for writing clean, maintainable, and testable code, which is essential for applying SOLID principles effectively.
View CLEAN CODE on Amazon
Show steps
  • Read the chapters related to code structure, design principles, and testing.
  • Apply the principles discussed in the book to your own C++ code.
  • Reflect on how these principles relate to the SOLID principles covered in the course.
Create a Presentation on a SOLID Principle
Deepen your understanding of a specific SOLID principle by creating a presentation. Teaching others is a great way to reinforce your own knowledge and identify areas where you need further clarification.
Show steps
  • Choose one of the SOLID principles (SRP, OCP, LSP, ISP, DIP).
  • Research the principle and gather examples of its application in C++.
  • Create a presentation that explains the principle and its benefits.
  • Present your findings to a peer or record a video presentation.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Implement Design Patterns Related to SOLID
Practice implementing design patterns that support SOLID principles. This will help you understand how to apply SOLID principles in different contexts and improve your ability to design flexible and maintainable software.
Show steps
  • Study the implementation of design patterns like Strategy, Decorator, and Observer.
  • Implement these patterns in C++ using SOLID principles.
  • Test your implementations with various scenarios.
Refactor an Existing C++ Project Using SOLID Principles
Apply SOLID principles to a real-world C++ project to solidify your understanding. Refactoring existing code will help you identify design flaws and learn how to improve code quality using SOLID principles.
Show steps
  • Choose a C++ project with design flaws or areas for improvement.
  • Identify violations of SOLID principles in the project's code.
  • Refactor the code to adhere to SOLID principles, documenting your changes.
  • Write unit tests to ensure the refactored code functions correctly.
Review 'Design Patterns: Elements of Reusable Object-Oriented Software'
Explore design patterns that complement and support SOLID principles. Understanding design patterns will help you apply SOLID principles more effectively and create more robust and maintainable software.
View Design Patterns on Amazon
Show steps
  • Read the sections on creational, structural, and behavioral design patterns.
  • Identify patterns that can be used to implement SOLID principles.
  • Practice implementing these patterns in C++.
Contribute to an Open Source C++ Project
Gain practical experience applying SOLID principles in a collaborative environment. Contributing to open source projects will expose you to real-world codebases and help you learn from experienced developers.
Show steps
  • Find an open-source C++ project that interests you.
  • Identify areas where you can contribute, such as bug fixes or new features.
  • Apply SOLID principles when writing your code.
  • Submit your code for review and incorporate feedback from other developers.

Career center

Learners who complete SOLID C++ will develop knowledge and skills that may be useful to these careers:
Software Developer
A software developer designs, develops, and tests software applications. The SOLID C++ course helps a software developer write robust, maintainable, and flexible code. A software developer who understands object-oriented design principles can create high-quality software. The course covers object-oriented design principles, UML diagrams, and C++ language features. Working on the included real-world project, a server application that processes tax reports, can help a software developer gain practical experience. This course is essential for any software developer creating maintainable C++ applications.
Software Engineer
A software engineer applies engineering principles to the design, development, maintenance, testing, and evaluation of computer software. The SOLID C++ course can help a software engineer build a foundation in SOLID principles, which promote robust, well-structured code. Software engineers who can design with Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion principles are highly valued. Through the course's practical examples, UML diagrams, and project assignments, a software engineer can learn to apply SOLID principles to real-world projects. Those studying to become software engineers with a focus on C++ will find the course particularly relevant.
Application Developer
An application developer creates, tests, and maintains software applications for computers and other devices. This SOLID C++ course can help an application developer create stable and well-designed applications. Application developers must write code that is easy to update and maintain. The course's discussion of SOLID principles, and the included project involving a server application to process tax reports, helps an application developer learn how to build robust and maintainable software. Given the focus on C++ this course is important for application developers who focus on C++ applications.
Game Developer
A game developer creates video games for various platforms. Game developers must understand how to write robust, maintainable, and efficient code. C++ is a common language in this industry. This SOLID C++ course can help a game developer learn how to design game systems that are easy to modify and extend. The course's focus on object-oriented design principles and C++ language features can help a game developer write better game engines and game logic. A game developer can use this course to write high-performance game code.
Robotics Engineer
A robotics engineer designs, builds, and programs robots. The SOLID C++ course can help a robotics engineer write reliable code for robot control systems. Robotics engineers frequently use C++ for its performance and flexibility. The course, with its focus on SOLID principles and C++, provides valuable insights for creating modular and testable robot software. A robotics engineer can use the course examples to build a foundation in SOLID principles.
Embedded Systems Engineer
An embedded systems engineer designs and develops software for embedded systems, such as those found in cars and appliances. The SOLID C++ course is useful for an embedded systems engineer. The course can can assist in writing robust and efficient code for resource-constrained environments. Embedded systems engineers often work with C++. The course's focus on C++ language features and object-oriented design principles can help an engineer deal with the complexities of embedded systems development. The course can help create maintainable and testable embedded software.
Backend Developer
A backend developer works on the server-side logic and databases that power applications. This SOLID C++ course may be useful for a backend developer who wants to write cleaner, more maintainable C++ code. Backend systems benefit greatly from adherence to SOLID principles, and the course provides the foundation to apply these concepts in server-side development. The course assignments, including working on a server application that uses Boost libraries, provides experience relevant to real-world backend projects. This course will give backend developers insight into how to write modular and testable code.
Technical Lead
A technical lead guides a team of developers, ensuring code quality and adherence to best practices. The SOLID C++ course may assist a technical lead by deepening their understanding of object-oriented design principles. A technical lead is responsible for promoting maintainable and testable code. The course, with its focus on SOLID principles and C++, helps a technical lead promote these principles within their team. The course's material on project structure can assist one in guiding development projects with modular and well-tested C++ code.
Software Consultant
A software consultant advises clients on software development strategies and best practices. The SOLID C++ course may assist a software consultant with C++ expertise. Software consultants require a deep understanding of software design principles to recommend effective solutions. The course's focus on SOLID principles and UML diagrams can assist a consultant in evaluating and improving existing codebases. The course is helpful for consultants helping to ensure that C++ projects are well-structured and maintainable.
Systems Architect
A systems architect designs the structure of computer systems, including hardware, software, and communication networks. The SOLID C++ course may be useful for a systems architect. An understanding of SOLID principles, as taught in the course, allows the systems architect to design systems that are flexible and easy to maintain. The course's coverage of UML diagrams, and focus on object-oriented design, is valuable to a systems architect responsible for creating well-structured software systems. The course helps them build systems that are robust and scalable.
Principal Engineer
A principal engineer is a senior-level software engineer who provides technical leadership and guidance to development teams. The SOLID C++ course may be useful to a principal engineer who wants to deepen their understanding of object-oriented design principles. The course's focus on SOLID principles, UML diagrams, and C++ language features can help a principal engineer lead by example in writing high-quality code. The course's coverage of project structure, testing, and refactoring provides valuable insights for leading software development projects. This course is particularly suited to principal engineers overseeing C++ development.
Quantitative Analyst
A quantitative analyst, often working in the finance industry, develops and implements mathematical models for financial analysis and risk management. The SOLID C++ course may assist a quantitative analyst who needs to develop high-performance trading systems or risk analysis tools. The course's focus on object-oriented design principles, project structure, and C++ language features can help a quantitative analyst write robust and efficient code for financial applications. The course will help one manage complexity in quantitative codebases.
Compiler Developer
A compiler developer designs and implements compilers, which translate source code from one programming language to another. Compiler development may require a deeper understanding of language design principles and code structure. This SOLID C++ course may be useful to a compiler developer, providing insights into how to design robust and maintainable codebases. The course's focus on object-oriented design principles and UML diagrams can help one design compilers that produce efficient and well-structured code. This is role that typically requires an advanced degree.
Operating Systems Developer
An operating systems developer designs and implements the core software that manages computer hardware and provides services for applications. This role may require a deep understanding of system-level programming and code structure. The SOLID C++ course may be useful to an operating systems developer, providing insights into how to design robust and maintainable codebases. The course's focus on object-oriented design principles and C++ language features can help operating systems developers manage the complexity of operating system code. This is role that typically requires an advanced degree.
Database Administrator
A database administrator manages and maintains databases, ensuring data integrity and availability. The SOLID C++ course may assist a database administrator by teaching robust and modular coding practices. While a database administrator does not often develop software, familiarity with software design principles can help in troubleshooting. An understanding of object-oriented design and project structure can aid in working with database-related tools and applications. This course helps to improve one's understanding of broader system architecture.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in SOLID C++.
Provides practical advice on writing clean, maintainable code. It complements the SOLID principles by offering concrete examples and best practices. It is commonly used as a textbook in software engineering courses. Reading this book will help you understand how to apply SOLID principles in real-world scenarios.
Classic reference on design patterns. While not specific to SOLID, many of the patterns described in this book are useful for implementing SOLID principles. It valuable resource for understanding how to design flexible and reusable object-oriented software. This book is more valuable as additional reading than it is as a current reference.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser