add getAttackPower method to pattern decorator
Add getAttackPower method to pattern decorator may make it more easily to understand .

when the troll not add smart decorator , his attack power is 10 ,but when we build the smartTroll , his attack power is 10(the normal troll's attack power) + 20(because smart). So ,it's more easy to understand .

decorator/src/main/java/com/iluwatar/decorator/App.java decorator/src/main/java/com/iluwatar/decorator/Hostile.java decorator/src/main/java/com/iluwatar/decorator/SmartTroll.java decorator/src/main/java/com/iluwatar/decorator/Troll.java
decorator/src/main/java/com/iluwatar/decorator/App.java decorator/src/main/java/com/iluwatar/decorator/Hostile.java decorator/src/main/java/com/iluwatar/decorator/SmartTroll.java decorator/src/main/java/com/iluwatar/decorator/Troll.java
diff --git a/decorator/src/main/java/com/iluwatar/decorator/App.java b/decorator/src/main/java/com/iluwatar/decorator/App.java
index 88e1c7103175..a9eabf6068c0 100644
--- a/decorator/src/main/java/com/iluwatar/decorator/App.java
+++ b/decorator/src/main/java/com/iluwatar/decorator/App.java
@@ -23,11 +23,13 @@ public static void main(String[] args) {
 		Hostile troll = new Troll();
 		troll.attack();
 		troll.fleeBattle();
+		System.out.printf("Simple troll power %d.\n", troll.getAttackPower());
 
 		// change the behavior of the simple troll by adding a decorator
 		System.out.println("\nA smart looking troll surprises you.");
 		Hostile smart = new SmartTroll(troll);
 		smart.attack();
 		smart.fleeBattle();
+		System.out.printf("Smart troll power %d.\n", smart.getAttackPower());
 	}
 }
diff --git a/decorator/src/main/java/com/iluwatar/decorator/Hostile.java b/decorator/src/main/java/com/iluwatar/decorator/Hostile.java
index 4df751cca69d..7090725017f4 100644
--- a/decorator/src/main/java/com/iluwatar/decorator/Hostile.java
+++ b/decorator/src/main/java/com/iluwatar/decorator/Hostile.java
@@ -9,6 +9,8 @@ public interface Hostile {
 
 	void attack();
 
+	int getAttackPower();
+
 	void fleeBattle();
 
 }
diff --git a/decorator/src/main/java/com/iluwatar/decorator/SmartTroll.java b/decorator/src/main/java/com/iluwatar/decorator/SmartTroll.java
index 22ba88dc88b8..909f94c952ff 100644
--- a/decorator/src/main/java/com/iluwatar/decorator/SmartTroll.java
+++ b/decorator/src/main/java/com/iluwatar/decorator/SmartTroll.java
@@ -21,6 +21,12 @@ public void attack() {
 		decorated.attack();
 	}
 
+	@Override
+	public int getAttackPower() {
+		// decorated troll power + 20 because it is smart
+		return decorated.getAttackPower() + 20;
+	}
+
 	@Override
 	public void fleeBattle() {
 		System.out.println("The troll calls for help!");
diff --git a/decorator/src/main/java/com/iluwatar/decorator/Troll.java b/decorator/src/main/java/com/iluwatar/decorator/Troll.java
index 11e9b9d1afdf..85d873dbe5c1 100644
--- a/decorator/src/main/java/com/iluwatar/decorator/Troll.java
+++ b/decorator/src/main/java/com/iluwatar/decorator/Troll.java
@@ -11,6 +11,11 @@ public void attack() {
 		System.out.println("The troll swings at you with a club!");
 	}
 
+	@Override
+	public int getAttackPower() {
+		return 10;
+	}
+
 	public void fleeBattle() {
 		System.out.println("The troll shrieks in horror and runs away!");
 	}
