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 FriendlyFight implements IMode{
  11.      /**
  12.      *  invokes the friendly fighting aka tea party method
  13.      * @author LordAmit
  14.      * @param sol specifies the Soldier which is being used.
  15.      *
  16.      * @since 2011
  17.      */
  18.     public void fight(Soldier sol) {
  19.         System.out.println("This is "+sol.getName()+ " having a tea party");
  20.     }
  21. }