Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Vehicle.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
}
Expand All @@ -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);
}
Expand Down