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); } }
void approveOrder(Order order) { var purchaser = new JrPurchaser(); purchaser.ProcessOrder(order); }