Beispiel #1
0
 public override void Process(Purches purches)
 {
     if (purches.Number > 10)
     {
         throw new Exception();
     }
     approver.Process(purches);
 }
Beispiel #2
0
 public override void Process(Purches purches)
 {
     if (purches.Amount > 1000)
     {
         throw new Exception();
     }
     approver.Process(purches);
 }
Beispiel #3
0
        static void Main(string[] args)
        {
            Approver a = new employee();
            Approver b = new viceManager();
            Approver c = new Manager();

            a.Setsuccessor(b);
            b.Setsuccessor(c);
            Purches purches = new Purches(10, 1000);

            a.Process(purches);
            Console.ReadKey();
        }
Beispiel #4
0
 public override void Process(Purches purches)
 {
     Console.WriteLine("HI");
 }
Beispiel #5
0
 public abstract void Process(Purches purches);