Uploaded March 2024 | Updated November 2026, 5 days ago
The infamous Square-Rectangle Problem is a great way to understand why Liskov's Substitution Principle is important. Do you know the answer to the problem?
💚 BUY MY BOOK:
theobjectorientedway.com
▶️ Watch this next:
youtu.be/7hXi0N1oWFU
00:00 The Problem
01:08 Defining Rectangle
01:35 Using Rectangle
02:16 Defining Square
02:37 Using Square
03:27 Overriding methods
04:39 Violating the super type
09:09 Question
09:27 Takeaway
The infamous Square-Rectangle Problem is a great way to understand why Liskov's Substitution Principle is important. Do you know the answer to the problem?
💚 BUY MY BOOK:
theobjectorientedway.com
▶️ Watch this next:
youtu.be/7hXi0N1oWFU
00:00 The Problem
01:08 Defining Rectangle
01:35 Using Rectangle
02:16 Defining Square
02:37 Using Square
03:27 Overriding methods
04:39 Violating the super type
09:09 Question
09:27 Takeaway










