Comments for the strategy example.

This commit is contained in:
Ilkka Seppala committed 2014-08-31 11:27:19 +03:00
1 parent 4debc8eda4
commit 94b289801b
3 files changed
+16

No files matched your search

@@ -1,5 +1,11 @@
package com.iluwatar;
/**
*
* Strategy (DragonSlayingStrategy) encapsulates the algorithm to use.
* The object (DragonSlayer) can alter its behavior by changing its strategy.
*
*/
public class App
{
public static void main( String[] args )
@@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* DragonSlayer uses different strategies to slay the dragon.
*
*/
public class DragonSlayer {
private DragonSlayingStrategy strategy;
@@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* Strategy interface.
*
*/
public interface DragonSlayingStrategy {
void execute();