← Quiz: SOLID Principles: all 10 questions
Quiz: SOLID Principles · Question 2 of 10
Adding a new payment type by writing a new class, without editing existing code, follows:
Adding a new payment type by writing a new class, without editing existing code, follows:
- A.Single Responsibility
- B.Open/Closed
- C.Interface Segregation
- D.Liskov Substitution
Answer & explanation
Correct answer: Open/Closed
Open for extension (new class), closed for modification (no edits).
Can you get the rest right without peeking?
Take the timed Quiz: SOLID Principles quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →