Just formatting App classes to be like the other class files on the project

This commit is contained in:
Matthew
2014-10-07 16:23:37 +01:00
parent 52f0923df9
commit bde5b343d0
24 changed files with 466 additions and 508 deletions

View File

@ -1,26 +1,24 @@
package com.iluwatar;
/**
*
* Decorator pattern is more flexible alternative to
* subclassing. The decorator class implements the same
* interface as the target and uses composition to
*
* Decorator pattern is more flexible alternative to subclassing. The decorator
* class implements the same interface as the target and uses composition to
* "decorate" calls to the target.
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println("A simple looking troll approaches.");
Hostile troll = new Troll();
troll.attack();
troll.fleeBattle();
System.out.println("\nA smart looking troll surprises you.");
Hostile smart = new SmartTroll(new Troll());
smart.attack();
smart.fleeBattle();
public class App {
public static void main(String[] args) {
System.out.println("A simple looking troll approaches.");
Hostile troll = new Troll();
troll.attack();
troll.fleeBattle();
System.out.println("\nA smart looking troll surprises you.");
Hostile smart = new SmartTroll(new Troll());
smart.attack();
smart.fleeBattle();
}
}