Guest User

Vehicles-3

a guest
Mar 2nd, 2018
181
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Truck : Vehicle
  2. {
  3. private static readonly double ADDITIONAL_CONSUMPTION = 1.6;
  4. private static readonly double QTY_MODIFIER = 0.95;
  5.  
  6. public Truck(double fuelQuantity, double fuelConsumption)
  7. : base(fuelQuantity, fuelConsumption + ADDITIONAL_CONSUMPTION)
  8. { }
  9.  
  10. public override void Refuel(double quantity)
  11. {
  12. FuelQuantity += (quantity * QTY_MODIFIER);
  13. }
  14. }
RAW Paste Data