Skip to content

Commit 2e07a68

Browse files
committed
Comments for template method example.
1 parent 94b2898 commit 2e07a68

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

template-method/src/main/java/com/iluwatar/App.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* Template Method (StealingMethod) defines skeleton for the
6+
* algorithm and subclasses (HitAndRunMethod, SubtleMethod)
7+
* fill in the blanks.
8+
*
9+
*/
310
public class App
411
{
512
public static void main( String[] args )

template-method/src/main/java/com/iluwatar/HalflingThief.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* Halfling thief uses StealingMethod to steal.
6+
*
7+
*/
38
public class HalflingThief {
49

510
private StealingMethod method;

template-method/src/main/java/com/iluwatar/StealingMethod.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* Template Method base class.
6+
*
7+
*/
38
public abstract class StealingMethod {
49

510
protected abstract String pickTarget();

0 commit comments

Comments
 (0)