Home - marcelstoltz00/Photosyntech GitHub Wiki
PhotoSyntech is a C++ plant management system demonstrating multiple design patterns, including growth and care simulation for various plant types.
- 🌱 Plant Management: Track and manage a virtual collection of plants.
- ☀️ Growth Simulation: Watch your plants grow, change, and react based on care routines.
- 🎨 Design Pattern Showcase: A practical C++ demonstration of multiple GoF design patterns.
PhotoSyntech employs 12 different design patterns to create a modular, extensible, and efficient system. Below is a summary of the patterns used. For a more detailed explanation, please see the individual documentation files.
| Category | Pattern | Responsibility |
|---|---|---|
| Creational | Builder | Constructs complex plant objects step by step, separating construction from representation. |
| Prototype | Creates new plant objects by cloning existing instances, avoiding costly creation. | |
| Singleton | Ensures a single, global instance for shared resources like the main inventory and flyweight factories. | |
| Structural | Composite | Treats individual plants and groups of plants uniformly in a hierarchical structure. |
| Decorator | Dynamically adds new attributes and behaviors to plant objects without altering their structure. | |
| Facade | Provides a simplified, unified interface to the complex subsystems of the nursery. | |
| Flyweight | Minimizes memory usage by sharing common, immutable data (like strategies and seasons) among many objects. | |
| Behavioral | Iterator | Provides a standard way to traverse plant collections, with support for filtering (e.g., by season). |
| Mediator | Centralizes communication between staff and customers, reducing direct dependencies between them. | |
| Observer | Notifies staff automatically when plants change state or require care. | |
| State | Manages a plant's lifecycle (Seed, Vegetative, Mature, Dead) by altering its behavior as its state changes. | |
| Strategy | Defines a family of interchangeable algorithms for plant care (e.g., watering, sun exposure). |