added updateFuelLevel routines, changed fuelLevel from float to double
This commit is contained in:
parent
b4dd6a32d0
commit
036b6f63da
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
public class SelfDrivingCar {
|
public class SelfDrivingCar {
|
||||||
private int speed;
|
private int speed;
|
||||||
private int fuelLevel;
|
private double fuelLevel;
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,8 @@ public class SelfDrivingCar {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateFuelLevel() {
|
public void updateFuelLevel() {
|
||||||
|
//would check fuel sensor and update accordingly
|
||||||
|
fuelLevel = 0.75;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeDirection() {
|
public void changeDirection() {
|
||||||
|
|
Loading…
Reference in a new issue