Just formatting App classes to be like the other class files on the project
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user