Comments for template method example.
This commit is contained in:
		| @@ -1,5 +1,12 @@ | |||||||
| package com.iluwatar; | package com.iluwatar; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  *  | ||||||
|  |  * Template Method (StealingMethod) defines skeleton for the | ||||||
|  |  * algorithm and subclasses (HitAndRunMethod, SubtleMethod)  | ||||||
|  |  * fill in the blanks. | ||||||
|  |  * | ||||||
|  |  */ | ||||||
| public class App  | public class App  | ||||||
| { | { | ||||||
|     public static void main( String[] args ) |     public static void main( String[] args ) | ||||||
|   | |||||||
| @@ -1,5 +1,10 @@ | |||||||
| package com.iluwatar; | package com.iluwatar; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  *  | ||||||
|  |  * Halfling thief uses StealingMethod to steal. | ||||||
|  |  * | ||||||
|  |  */ | ||||||
| public class HalflingThief { | public class HalflingThief { | ||||||
|  |  | ||||||
| 	private StealingMethod method; | 	private StealingMethod method; | ||||||
|   | |||||||
| @@ -1,5 +1,10 @@ | |||||||
| package com.iluwatar; | package com.iluwatar; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  *  | ||||||
|  |  * Template Method base class. | ||||||
|  |  * | ||||||
|  |  */ | ||||||
| public abstract class StealingMethod { | public abstract class StealingMethod { | ||||||
|  |  | ||||||
| 	protected abstract String pickTarget(); | 	protected abstract String pickTarget(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user