All quizzes
Free quiz · 30 questions in the bank

SOLID Principles quiz

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 Liskov Substitution Principle (LSP)?

Questions in this quiz
  1. Which sentence best captures the Liskov Substitution Principle (LSP)?
  2. Which sentence best captures the Open/Closed Principle (OCP)?
  3. Which statement best contrasts SRP and ISP?
  4. A `PaymentProcessor` class directly instantiates `new StripeClient()` in its constructor. Which principle does this violate?
  5. How does DIP differ from "dependency injection" (DI)?
  6. 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?
  7. What does the "S" in SOLID stand for?
  8. A new junior on the team writes a 1500-line `God` class that handles parsing, validation, persistence, and notifications. The single SOLID principle most directly relevant is:
  9. Which sentence best captures the Interface Segregation Principle (ISP)?
  10. `OrderShipper extends Order` so it can reuse the `total()` method. Per SOLID, this is usually:
  11. What does the "D" in SOLID stand for?
  12. What does the "O" in SOLID stand for?
Gaps to close?
Read the curated SOLID Principles notes — core concepts, patterns, interview prep.
SOLID Principles notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web