Advertisement
Guest User

Vehicles-3

a guest
Mar 2nd, 2018
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement