Question OOP-SOLID-0050
MediumWhich change violates the Open/Closed Principle?
- A.
Adding a new class that implements TaxRule
- B.
Writing a new test
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
SOLID and Design Principles question
Which change violates the Open/Closed Principle?
Adding a new class that implements TaxRule
Writing a new test
Sign up free to see the answer and a step-by-step explanation.
Editing a tested TaxCalculator class every time a new country is supported
Registering a new TaxRule in configuration