diff --git a/Vehicle.java b/Vehicle.java index d72a0bb..d709cb0 100644 --- a/Vehicle.java +++ b/Vehicle.java @@ -2,7 +2,8 @@ public class Vehicle { private String manufacturer; private String model; - private int makeYear; + private int makeYear; + private String fuelType; private Journey journey; @@ -16,6 +17,7 @@ public Vehicle() { this.manufacturer = "Central"; this.model = "ITWEB"; this.makeYear = 2014; + this.fuelType = "unleaded"; journey = new Journey(); fuelPurchase = new FuelPurchase(125.6); } @@ -28,10 +30,11 @@ public Vehicle() { * @param model * @param makeYear */ - public Vehicle(String manufacturer, String model, int makeYear) { + public Vehicle(String manufacturer, String model, int makeYear, String fuelType) { this.manufacturer = manufacturer; this.model = model; this.makeYear = makeYear; + this.fuelType = fuelType; journey = new Journey(); fuelPurchase = new FuelPurchase(125.6); }