Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /**
  2. * -->This page is prepared by LordAmit
  3. */
  4. package observer.strategypattern;
  5.  
  6. /**
  7.  *
  8.  * @author LordAmit
  9.  */
  10. public class DefensiveFight implements IMode{
  11.     /**
  12.      *  invokes the defensive fighting method
  13.      * @author LordAmit
  14.      * @param sol specifies the Soldier which is being used.
  15.      * @since 2011
  16.      */
  17.     public void fight(Soldier sol) {
  18.         System.out.println("Hi, this is "+sol.getName()+" fighting defensively");
  19.     }
  20.  
  21.  
  22.  
  23. }