Skip to content

Exploring Design Patterns in Practice with Java. This course is a module of the Bootcamp organised by DIO - Digital Innovation.

Notifications You must be signed in to change notification settings

andrezatcascais/dio-lab-patterns-project-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design Patterns

This repository contains examples and explanations for three common design patterns: Singleton, Strategy, and Facade.

Singleton

The Singleton pattern ensures a class has only one instance and provides a global point of access to it.

  • Intent: To control object creation, limiting the number of objects to one.
  • Use Case: When only one instance of a class is needed to coordinate actions across a system.

img.png

Strategy

The Strategy pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable.

  • Intent: To define a family of algorithms, encapsulate each one, and make them interchangeable.
  • Use Case: When you want to define a class that will have one behavior that is similar to other behaviors in a list.

img_1.png

Facade

The Facade pattern provides a simplified interface to a complex subsystem.

  • Intent: To provide a unified interface to a set of interfaces in a subsystem.
  • Use Case: When you want to provide a simple interface to a complex subsystem.

img_2.png

About

Exploring Design Patterns in Practice with Java. This course is a module of the Bootcamp organised by DIO - Digital Innovation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages