/CSE-308

Software Engineering Sessional

Primary LanguageJava

CSE 308: Software Engineering Course

Overview

This repository contains solutions to various design pattern problems implemented in Java as part of the CSE 308 Software Engineering course. The design patterns are organized across three offline folders, each containing multiple problems.


Project Structure

The repository is organized into three folders, with each folder focusing on specific design patterns.

Offline-1

This folder contains solutions for:

  1. Builder Pattern (Problem 1)
    • The Builder Pattern is used to construct complex objects step-by-step.
  2. Factory Pattern (Problem 2)
    • The Factory Pattern is used to create objects without specifying the exact class of object that will be created.

Offline-2

This folder contains solutions for:

  1. Observer Pattern (Problem 1)
    • The Observer Pattern defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified.
  2. Mediator Pattern (Problem 2)
    • The Mediator Pattern is used to reduce the complexity of communication between multiple objects by centralizing it in a mediator.
  3. State Pattern (Problem 3)
    • The State Pattern allows an object to alter its behavior when its internal state changes.

Offline-3

This folder contains solutions for:

  1. Adapter Pattern (Problem 1)
    • The Adapter Pattern allows incompatible interfaces to work together by providing a wrapper interface.
  2. Decorator Pattern (Problem 2)
    • The Decorator Pattern allows behavior to be added to an object dynamically without modifying its structure.
  3. Composite Pattern (Problem 3)
    • The Composite Pattern lets clients treat individual objects and compositions of objects uniformly.

Requirements

  • Java Development Kit (JDK): Version 8 or higher.
  • IDE: IntelliJ, Eclipse, or any preferred Java IDE.

How to Run

  1. Clone the repository:
    git clone https://github.com/NafiuRahman77/CSE-308.git
    cd CSE-308
  2. Navigate to the specific folder (Offline-1, Offline-2, or Offline-3).
  3. Compile and run the main.java files for each problem.
    javac main.java
    java main

References

  • Design Patterns: Elements of Reusable Object-Oriented Software by Gamma et al.

License

This project is licensed under the MIT License. See LICENSE file for details.