Design: Liskov Substitution Principle Demonstration System
In scope: Designing class hierarchies and interfaces to illustrate LSP, testing substitutability. Out of scope: Implementation in specific programming languages, performance optimization, integration with external systems.
Functional Requirements
FR1: Design a system to demonstrate the Liskov Substitution Principle (LSP) in object-oriented design.
FR2: The system should allow substituting derived classes wherever base classes are expected without altering correctness.
FR3: Include examples of classes that follow LSP and classes that violate LSP.
FR4: Provide a way to test or verify that substitutability holds for compliant classes.
FR5: Support clear separation of behaviors to illustrate correct and incorrect inheritance.
Non-Functional Requirements
NFR1: The design must be simple and understandable for beginners.
NFR2: Focus on clarity over complexity; no need for large-scale system.
NFR3: Use standard object-oriented design concepts.
NFR4: Ensure the design can be extended to add more examples of LSP compliance or violation.