Comments for the strategy example.

This commit is contained in:
Ilkka Seppala
2014-08-31 11:27:19 +03:00
parent 4debc8eda4
commit 94b289801b
3 changed files with 16 additions and 0 deletions

View File

@ -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 )

View File

@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* DragonSlayer uses different strategies to slay the dragon.
*
*/
public class DragonSlayer {
private DragonSlayingStrategy strategy;

View File

@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* Strategy interface.
*
*/
public interface DragonSlayingStrategy {
void execute();