#502 Replaced usages of System.out with logger.

This commit is contained in:
daniel-bryla
2016-10-23 19:59:03 +02:00
parent 4ca205c03c
commit 0438811489
154 changed files with 1155 additions and 792 deletions
@@ -22,6 +22,9 @@
*/
package com.iluwatar.templatemethod;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* StealingMethod defines skeleton for the algorithm.
@@ -29,6 +32,8 @@ package com.iluwatar.templatemethod;
*/
public abstract class StealingMethod {
private static final Logger LOGGER = LoggerFactory.getLogger(StealingMethod.class);
protected abstract String pickTarget();
protected abstract void confuseTarget(String target);
@@ -40,7 +45,7 @@ public abstract class StealingMethod {
*/
public void steal() {
String target = pickTarget();
System.out.println("The target has been chosen as " + target + ".");
LOGGER.info("The target has been chosen as {}.", target);
confuseTarget(target);
stealTheItem(target);
}