Skip to content

About

Hands-on learning and practice of software design patterns in CENG-4501 (Fall 2025 I MSKU University). Please make sure to look at the Readme file all class diagrams for all patterns are shown there!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Software Design Patterns

This repository contains implementations of several key software design patterns studied in the course CENG-4501 Software Design Patterns.
Each pattern is implemented in Java with simple examples to demonstrate its intent, structure, and usage.


📂 Patterns Covered

  • 🟢 Strategy Pattern

  • MOVING FROM INHERITENCE INTO COMPOSITION

    Example: Duck behaviors with interchangeable flying and quacking behaviors

    How class diagram is before applying stragtegy pattern: Alt text After applying : Alt text

    📺 YouTube Video: COMING SOON!

  • 🔵 Observer Pattern

  • MOVING FROM PULL TO PUSH!

    Example: Weather station and display devices.

    How class diagram is before applying Observer pattern: Alt text

    After applying Observer pattern : Alt text

  • 🟣 Decorator Pattern

  • CHANGING THE CONTENT OR BEHAVIOR OF AN OBJECT AT RUNTIME

    Problem before applying the pattern: Alt text

    After applying the pattern: Alt text

    Example: Star link Coffe` Adding condiments to a coffee (Decorating the coffee)

  • 🟠 Factory Pattern

    1- Simple Factory pattern Example : pizza store Before: Alt text

    After: Alt text

    2- Factory Method pattern

    Example : pizza store

    Before: Alt text

    After: Alt text

    3- Abstract Factory pattern Alt text

  • 🔴 Singleton Pattern

    Alt text

  • 🟡 Command Pattern
    Example: Remote control which closes Lights or another IOT devices connected to the remote by a command!

    • Concrete Invoker could be : remote control.
    • Concrete Command could be : TurnOnLightCommand.
    • Reciver is the Light class which has On(); and Off Methods.

    Alt text

🛠️ How to Run

  1. Clone this repository by running:
    git clone https://github.com/U210709718/SoftwareDesignPatterns

About

Hands-on learning and practice of software design patterns in CENG-4501 (Fall 2025 I MSKU University). Please make sure to look at the Readme file all class diagrams for all patterns are shown there!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages