From 323d807c69936add32d87a953860f1e510be3688 Mon Sep 17 00:00:00 2001 From: Abdullah Ilgaz Date: Wed, 2 Jun 2021 13:08:23 +0300 Subject: [PATCH 1/4] Parameter fixed Changed Rectangle to Rectangle[] in Good example for Liskov Substitution Principle (LSP). --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9aaeb3b..d5b3b9c 100644 --- a/README.md +++ b/README.md @@ -2141,7 +2141,7 @@ class Square : ShapeBase } } -Drawable RenderLargeRectangles(Rectangle rectangles) +Drawable RenderLargeRectangles(Rectangle[] rectangles) { foreach (rectangle in rectangles) { From 439e4116e474a84dbb9c46809011929d973cb15c Mon Sep 17 00:00:00 2001 From: Abdullah Ilgaz Date: Thu, 3 Jun 2021 11:09:13 +0300 Subject: [PATCH 2/4] Bad example fixed --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d5b3b9c..73cd621 100644 --- a/README.md +++ b/README.md @@ -1830,7 +1830,8 @@ class Employee - [S: Single Responsibility Principle (SRP)](#single-responsibility-principle-srp) - [O: Open/Closed Principle (OCP)](#openclosed-principle-ocp) -- [L: Liskov Substitution Principle (LSP)](#liskov-substitution-principle-lsp) +- [L: + v Substitution Principle (LSP)](#liskov-substitution-principle-lsp) - [I: Interface Segregation Principle (ISP)](#interface-segregation-principle-isp) - [D: Dependency Inversion Principle (DIP)](#dependency-inversion-principle-dip) @@ -2077,7 +2078,7 @@ class Square : Rectangle } } -Drawable RenderLargeRectangles(Rectangle rectangles) +Drawable RenderLargeRectangles(Rectangle[] rectangles) { foreach (rectangle in rectangles) { From e6ad4db4bd0fe8a4159ce3d207c2365f5b363f1b Mon Sep 17 00:00:00 2001 From: Abdullah Ilgaz Date: Thu, 3 Jun 2021 11:09:37 +0300 Subject: [PATCH 3/4] Bad example fixed From 880cea27b4f9751131975f49c062dbc66eeb63c8 Mon Sep 17 00:00:00 2001 From: Abdullah Ilgaz Date: Thu, 3 Jun 2021 11:12:28 +0300 Subject: [PATCH 4/4] Typo fixed --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 73cd621..30705fe 100644 --- a/README.md +++ b/README.md @@ -1830,8 +1830,7 @@ class Employee - [S: Single Responsibility Principle (SRP)](#single-responsibility-principle-srp) - [O: Open/Closed Principle (OCP)](#openclosed-principle-ocp) -- [L: - v Substitution Principle (LSP)](#liskov-substitution-principle-lsp) +- [L: Liskov Substitution Principle (LSP)](#liskov-substitution-principle-lsp) - [I: Interface Segregation Principle (ISP)](#interface-segregation-principle-isp) - [D: Dependency Inversion Principle (DIP)](#dependency-inversion-principle-dip)