Design: Law of Demeter Application in Software Design
Focus on the design principles and object interactions within a single module or small system. Out of scope are distributed systems, network communication, or database design.
Functional Requirements
FR1: Design a software module that follows the Law of Demeter to reduce coupling.
FR2: Ensure that objects only communicate with their immediate friends.
FR3: Avoid chaining calls that reach deep into object structures.
FR4: Demonstrate how to refactor a tightly coupled design into a loosely coupled one.
Non-Functional Requirements
NFR1: The design should minimize dependencies between modules.
NFR2: The system should be easy to maintain and extend.
NFR3: Latency and performance should not degrade significantly due to added abstraction.
NFR4: The design should be understandable by developers new to the project.