예제 #1
0
 public void ProcessOrder(Order order)
 {
     if (order.Total >= approved_amount)
     {
         order.Approved();
     }
     else
     {
         if(sucessor == null) throw new Exception("no one can approve this order. go talk to the president");
         sucessor.ProcessOrder(order);
     }
 }
예제 #2
0
 void approveOrder(Order order)
 {
     var purchaser = new JrPurchaser();
      purchaser.ProcessOrder(order);
 }