sequenceDiagram participant P as Program participant FR as FileReader participant CR as CSVReader participant MR as MorgReader participant MF as MorgFactory participant M as Morg participant D as Dish participant S as Simulator~Morg~ P->>FR: new FileReader("morgs.txt") FR->>CR: new CSVReader(fileReader) CR->>MR: new MorgReader(csvReader, factory) MR->>MF: CreateEntity(...) MF->>MF: CreateMovementStrategy() MF->>MF: CreateFeedingStrategy() MF->>MF: ParsePreyTypes() MF-->>MR: Morg instance MR-->>P: Morg P->>D: AddMorg(morg) D->>S: AddEntity(morg) P->>D: Run(RUN_TIME) D->>S: Run(runTime) loop Template Method S->>S: ProcessTimeStep() S->>S: FindPreyIfNeeded() S->>M: Move() M->>M: Notify() S->>S: CheckAndFeed() end