mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 16:58:56 +00:00
added strategy pattern sample
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
public class SpellStrategy implements DragonSlayingStrategy {
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
System.out.println("You cast the spell of disintegration and the dragon vaporizes in a pile of dust!");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user