Skip to content

This is a sample, in Java, of how to apply the Strategy Pattern in your project.

Notifications You must be signed in to change notification settings

reisvitt/strategy-pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Strategy Pattern - Sample

This is a sample, in Java, of how to apply the Strategy Pattern in your project.

It was used engine roar and headlights as behaviors that change from car to car.

Interfaces (strategy)

  • EngineRoar (roar)
  • HeadLight (turn on and turn off)

EngineRoar, HeadLight folders (Concrete Strategy)

Main (Context)

What is Strategy Pattern

Strategy defines a family of algorithms, encapsulates each of them and makes them interchangeable. It allows the algorithm to vary independently of the clients that use it.

App Screenshot

References

About

This is a sample, in Java, of how to apply the Strategy Pattern in your project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages