Skip to content

Small implementation of the Strategy Pattern for Polytech courses.

Notifications You must be signed in to change notification settings

tancou/Polytech-DesignPatternStrategy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Strategy Pattern

Simple implementation of the Strategy pattern for Polytech courses.

Java 8 needed.

image

Strategies used

List<Calculator> calculators =  Arrays.asList(
                new Calculator(new NullEverything()),
                new Calculator(new AsItIs()),
                new Calculator(new DoubleEverything()),
                new Calculator(new CubeEverything())
        );

Console output

Strategy Pattern 
[NullEverything => 0]
[AsItIs => 3]
[DoubleEverything => 6]
[CubeEverything => 9]

About

Small implementation of the Strategy Pattern for Polytech courses.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages