Ejemplo n.º 1
0
    private void Start()
    {
        Barbecuer boy        = new Barbecuer();
        Guest     guest_01   = new Guest(new BakeMuttonCommand(boy));
        Guest     guest_02   = new Guest(new BakeMuttonCommand(boy));
        Guest     guest_03   = new Guest(new BakeChickenWingCommand(boy));
        Waiter    girlWaiter = new Waiter();

        girlWaiter.SetOrder(guest_01._command);
        girlWaiter.SetOrder(guest_02._command);
        girlWaiter.SetOrder(guest_03._command);
        girlWaiter.Notify();

        girlWaiter.CancelOrder(guest_01._command);
        girlWaiter.Notify();
    }