classDiagram class Simulator~T~ { <> +Run(runTime: int) #ProcessTimeStep() #FindPreyIfNeeded(entity: T) #CheckAndFeed(entity: T) #FindNearestPrey(predator: T) Entity* } class Dish { #FindNearestPrey(predator: Morg) Entity* } Simulator~T~ <|-- Dish note for Simulator~T~ "Template Method Pattern: Run() defines the algorithm ProcessTimeStep() is the template FindPreyIfNeeded() is virtual CheckAndFeed() is virtual FindNearestPrey() is abstract" note for Dish "Concrete implementation: Implements FindNearestPrey() for Morg-specific prey finding"