Example #1
0
        static void Main(string[] args)
        {
            IBattery battery     = new Battery(5000);
            IBattery fastBattery = new FastChargingBattery(12000);

            var batteryCharger = new BatteryCharger(4000);

            batteryCharger.ChargeBattery(battery);
            batteryCharger.ChargeBattery(fastBattery);

            Console.ReadLine();
        }
Example #2
0
 public void ChargeBattery()
 {
     BatteryCharger.ChargeBattery(this);
 }