Test your SOLID Principles knowledge with a free interactive quiz — 30 questions with answers and explanations. No signup needed to play.
Question 1/5Score 0
Which sentence best captures the Open/Closed Principle (OCP)?
Questions in this quiz
Which sentence best captures the Open/Closed Principle (OCP)?
What does the "D" in SOLID stand for?
You inject a `ConsoleLogger` everywhere. In production you want to swap it for a structured JSON logger without changing every call site. Which principle is at play?
Which sentence best captures the Single Responsibility Principle (SRP)?
Which statement best contrasts SRP and ISP?
Which sentence best captures the Dependency Inversion Principle (DIP)?
Which sentence best captures the Interface Segregation Principle (ISP)?
Who popularized the SOLID acronym?
Which statement about SOLID and inheritance is most accurate?
What does the "S" in SOLID stand for?
What does the "L" in SOLID stand for?
A `UserService` class loads users from the database, formats them as JSON, sends a welcome email, and writes audit logs. Which principle does it most clearly violate?