From 3ca8d5fe1c6480de9fd27308a0d69785a2292472 Mon Sep 17 00:00:00 2001 From: Reid Harrison Date: Sat, 22 Jun 2024 13:05:08 -0400 Subject: [PATCH] Fix Correct/Incorrect Example header for OCP. --- 17.SOLID.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/17.SOLID.md b/17.SOLID.md index 34754d1..a212e55 100644 --- a/17.SOLID.md +++ b/17.SOLID.md @@ -126,7 +126,7 @@ This means that the behavior of a module/class/function can be extended without Let's consider an example of a `TaxCalculator` class that calculates tax based on the type of product. Initially, the class is not following `OCP`, because **_every time a new tax type is introduced, the class has to be modified._** -#### Correct Example +#### Incorrect Example ```python class TaxCalculator: @@ -138,7 +138,7 @@ class TaxCalculator: # More conditions for other product types ``` -#### Incorrect Example +#### Correct Example To follow the `OCP`, we can define a generic `TaxCalculator` class and then extend it for each specific tax type.