AlgoMaster Logo

Exercise: Liskov Substitution Principle

Last Updated: February 16, 2026

Try implementing the below code exercises to reinforce your understanding. Your goal is to implement the classes below so that they produce the expected output.

Exercise 1: The Rectangle/Square Problem

Exercise 2: The Bird/Penguin Problem