Design: Template Method Pattern Implementation
Design and implement the Template Method pattern focusing on class structure and method overriding. Out of scope are specific application domains or UI implementations.
Functional Requirements
FR1: Define a base algorithm structure with fixed steps.
FR2: Allow subclasses to override certain steps without changing the algorithm's structure.
FR3: Ensure the algorithm steps are executed in a specific order.
FR4: Support reuse of common code in the base class.
FR5: Allow easy extension for new variations of the algorithm.
Non-Functional Requirements
NFR1: The base algorithm structure must remain unchanged by subclasses.
NFR2: Subclasses can only override specific steps, not the entire algorithm.
NFR3: The design should promote code reuse and avoid duplication.
NFR4: The solution should be easy to understand and maintain.
