Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Truck : Vehicle
- {
- private static readonly double ADDITIONAL_CONSUMPTION = 1.6;
- private static readonly double QTY_MODIFIER = 0.95;
- public Truck(double fuelQuantity, double fuelConsumption)
- : base(fuelQuantity, fuelConsumption + ADDITIONAL_CONSUMPTION)
- { }
- public override void Refuel(double quantity)
- {
- FuelQuantity += (quantity * QTY_MODIFIER);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement