Example #1
0
        static void Main(string[] args)
        {
            TravelManager tm = new TravelManager();

            tm.ToIndia();
            tm.ToUK();
            tm.ToUS();
            tm.ToIndia();

            Console.ReadLine();
        }
Example #2
0
 public abstract void ToUS(TravelManager tm);
Example #3
0
 public abstract void ToIndia(TravelManager tm);
Example #4
0
 public void ChangeState(TravelManager tm, State s)
 {
     tm.ChangeState(s);
 }
Example #5
0
 public override void ToUS(TravelManager tm)
 {
     Console.WriteLine("To US");
     ChangeState(tm, US.Instance());
 }
Example #6
0
 public override void ToIndia(TravelManager tm)
 {
     Console.WriteLine("Already In India");
 }
Example #7
0
 public override void ToUK(TravelManager tm)
 {
     Console.WriteLine("Already In UK");
 }
Example #8
0
 public override void ToIndia(TravelManager tm)
 {
     Console.WriteLine("To India");
     ChangeState(tm, India.Instance());
 }