The Plant Nursery Management System is a comprehensive C++ application designed to simulate and manage the daily operations of a plant nursery.
It models real-world entities such as plants, staff, zones, deliveries, and customers, while demonstrating a deep understanding of object-oriented programming and software design principles.
The project was developed as part of the COS 214 Software Modelling module at the University of Pretoria and implements twelve classic design patterns (creational, structural, and behavioral).
It emphasizes modularity, scalability, and flexibility, ensuring that new features can be easily added without modifying existing code.
- Builder Pattern – Constructs complex plant configurations via
PlantBuilder,PotPlantBuilder, andWrapPlantBuilder. - Factory Method Pattern – Creates staff and customer objects using
StaffFactoryandCustomerFactory. - Prototype Pattern – Supports cloning of existing plants for efficient duplication.
- Abstract Factory Pattern – (Optional extension) Produces related families of plant and wrapping combinations.
- Decorator Pattern – Dynamically adds wrapping or decoration features to plants (
PlantDecorator,PlantWrap,Bow,Ribbon). - Composite Pattern – Manages plant hierarchies and groupings using
PlantComponent. - Adapter Pattern – (If used) Provides compatibility between differing interfaces.
- State Pattern – Manages plant lifecycle transitions (
Seedling,Growing,Mature,Withered). - Status Pattern – Tracks logistical states (
InStorage,Sold,OutForDelivery). - Strategy Pattern – Switches between plant care strategies (
LowCare,MediumCare,HighCare). - Command Pattern – Encapsulates and executes actions (
CareCommand,CustomerCommand). - Iterator Pattern – Provides sequential traversal of plant collections (
PlantIterator). - Observer Pattern – Updates dependent systems automatically when plant states change (
PlantObserver). - Mediator Pattern – Coordinates communication between staff, care commands, and delivery modules.
Requirements
- C++17 or later
- GNU Make 4.3 or newer
- SFML library (
libsfml-dev) - doctest (included in
/lib) - Linux or WSL environment recommended
- Optional: Valgrind for memory checking
Setup
- To download SFML library sudo apt install libsfml-dev