mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 10:58:51 +00:00
added strategy pattern sample
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
public class ProjectileStrategy implements DragonSlayingStrategy {
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
System.out.println("You shoot the dragon with the magical crossbow and it falls dead on the ground!");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user