#107 JavaDoc for Strategy
This commit is contained in:
parent
ed416ac759
commit
934f99e2a9
@ -2,12 +2,16 @@ package com.iluwatar.strategy;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Strategy (DragonSlayingStrategy) encapsulates an algorithm. The containing
|
* Strategy ({@link DragonSlayingStrategy}) encapsulates an algorithm. The containing
|
||||||
* object (DragonSlayer) can alter its behavior by changing its strategy.
|
* object ({@link DragonSlayer}) can alter its behavior by changing its strategy.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class App {
|
public class App {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Program entry point
|
||||||
|
* @param args command line args
|
||||||
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println("Green dragon spotted ahead!");
|
System.out.println("Green dragon spotted ahead!");
|
||||||
DragonSlayer dragonSlayer = new DragonSlayer(new MeleeStrategy());
|
DragonSlayer dragonSlayer = new DragonSlayer(new MeleeStrategy());
|
||||||
|
@ -4,6 +4,11 @@ import org.junit.Test;
|
|||||||
|
|
||||||
import com.iluwatar.strategy.App;
|
import com.iluwatar.strategy.App;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Application test
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class AppTest {
|
public class AppTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user