Certainly! Here's a basic README for your GitHub repository:


Gang of Four Design Patterns in Java

This repository contains examples of Gang of Four design patterns implemented in Java. Each design pattern is categorized based on its type: creational, structural, and behavioral.

Creational Patterns

Factory Method

The Factory Method pattern provides an interface for creating objects in a superclass, but allows subclasses to alter the type of objects that will be created.

Examples:

  • Region.java: The Region factory needs implementation of the abstract method renderFirstLife(), wich returns a moss.
  • Demo.java: Initialize the example above.

Abstract Factory

Abstract Factory is a creational design pattern, which solves the problem of creating entire product families without specifying their concrete classes.

Examples:

  • GamerPcFactory.java: The GamerPcFactory is a factory that uses the Processor interface and the storage Interface, agnostic of which model the pc is using.
  • Demo.java: Initialize the example above.