public void Charge(BatteryBase battery) { if ((battery.MaxCapacity - battery.Capacity) < vCapacity) { battery.Charge(); vCapacity = vCapacity - (battery.MaxCapacity - battery.Capacity); Output.WriteLine("Charging battery"); } else { Output.WriteLine("Battery cannot be charged"); } }
public void Charge(BatteryBase battery) { battery.Charge(); Output.WriteLine("Charging battery"); }
public void Charge(BatteryBase battery) { battery.Charge(); Console.WriteLine("Charging battery"); }