added strategy pattern sample
This commit is contained in:
10
strategy/src/main/java/com/iluwatar/ProjectileStrategy.java
Normal file
10
strategy/src/main/java/com/iluwatar/ProjectileStrategy.java
Normal file
@@ -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