From ab6d3799bfaddcaad03ad038c847583a4e487e74 Mon Sep 17 00:00:00 2001 From: Ryan <041401111@my.central.wa.edu> Date: Thu, 1 May 2014 15:52:25 +0800 Subject: [PATCH] Update Vehicle.java --- Vehicle.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); }