Exemple #1
0
        public static void Test()
        {
            PoliceAlarm pAlarm = new PoliceAlarm();
            PoliceLight pLight = new PoliceLight();
            ICar        car    = new CarAdapter(pAlarm, pLight);

            car.alarm();
            car.light();
        }
Exemple #2
0
 public CarAdapter(PoliceAlarm alarm, PoliceLight light)
 {
     m_alarm = alarm;
     m_light = light;
 }