Esempio n. 1
0
        private void btnStart_Click(object sender, RoutedEventArgs e)
        {
            Driver driver = new Driver();
            Bus    bus    = new Bus();

            driver.Move(bus);
            txtOutut.AppendText(bus.action + Environment.NewLine);

            Husky      husky     = new Husky();
            ITransport transport = new WalkToTravelAdapter(husky);

            driver.Move(transport);
            txtOutut.AppendText(husky.action + Environment.NewLine);
        }
Esempio n. 2
0
 public WalkToTravelAdapter(Husky h)
 {
     husky = h;
 }