Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package OOP.Polymorphism.Vehicles;
- public class Car extends Vehicle {
- private static final double ADDITIONAL_CONSUMPTION = 0.9;
- public Car(double fuelQuantity, double fuelConsumption, double tankCapacity) {
- super(fuelQuantity, fuelConsumption + ADDITIONAL_CONSUMPTION, tankCapacity);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement