package com.iluwatar.delegation.simple;

import com.iluwatar.delegation.simple.printers.CanonPrinter;
import com.iluwatar.delegation.simple.printers.EpsonPrinter;
import com.iluwatar.delegation.simple.printers.HpPrinter;

/**
 * In this example the delegates are {@link EpsonPrinter}, {@link HpPrinter} and {@link CanonPrinter} they all implement
 * {@link Printer}. The {@link AbstractPrinterController} and through inheritance {@link PrinterController} also
 * implement {@link Printer}. However neither provide the functionality of {@link Printer} by printing to the screen,
 * they actually call upon the instance of {@link Printer} that they were instantiated with. Therefore delegating the
 * behaviour to another class.
 */
public class App {

  public static final String MESSAGE_TO_PRINT = "hello world";

  /**
   * Program entry point
   *
   * @param args command line args
   */
  public static void main(String[] args) {
    PrinterController hpPrinterController = new PrinterController(new HpPrinter());
    PrinterController canonPrinterController = new PrinterController(new CanonPrinter());
    PrinterController epsonPrinterController = new PrinterController(new EpsonPrinter());

    hpPrinterController.print(MESSAGE_TO_PRINT);
    canonPrinterController.print(MESSAGE_TO_PRINT);
    epsonPrinterController.print(MESSAGE_TO_PRINT);
  }

}

@@ -226,41 +226,311 @@
 %0A * 
-In this example the delegates are
+The delegate pattern provides a mechanism to abstract away the implementation and control of the desired action.%0A * The class being called in this case %7B@link PrinterController%7D is not responsible for the actual desired action,%0A * but is actually delegated to a helper class either %7B@link CanonPrinter%7D,
  %7B@l
@@ -538,33 +538,35 @@
 nk EpsonPrinter%7D
-,
+ or
  %7B@link HpPrinte
@@ -571,63 +571,202 @@
 ter%7D
- and %7B@link CanonPr
+.%0A * The consumer does not have or require knowledge of the actual class carrying out the action, only the%0A * conta
 in
-t
 er
-%7D they all implement%0A *
+ on which they are calling.%0A *%0A * In this example the delegates are
  %7B@link 
 Prin
@@ -761,24 +761,29 @@
  %7B@link 
+Epson
 Printer%7D
 . The %7B@
@@ -778,21 +778,17 @@
 ter%7D
-. The
+,
  %7B@link 
 Abst
@@ -787,57 +787,85 @@
 ink 
-AbstractPrinterController%7D and through inheritanc
+HpPrinter%7D and %7B@link CanonPrinter%7D they all implement%0A * %7B@link Printer%7D. Th
 e %7B@
@@ -891,16 +891,19 @@
 ler%7D
+ class
  also
-%0A *
  imp
@@ -908,16 +908,17 @@
 mplement
+s
  %7B@link 
@@ -954,16 +954,19 @@
 vide the
+%0A *
  functio
@@ -1017,19 +1017,16 @@
  screen,
-%0A *
  they ac
@@ -1073,16 +1073,19 @@
 Printer%7D
+%0A *
  that th
@@ -1135,19 +1135,16 @@
 ting the
-%0A *
  behavio

Update App.java to have more information on the pattern #324