@ -81,7 +81,7 @@ public class Car extends BaseClass implements Comparable<Car>{
@@ -81,7 +81,7 @@ public class Car extends BaseClass implements Comparable<Car>{
}
publicstaticCarget(Objectid){
returncars.get(Integer.parseInt(""+id));// try to get by id
returnisNull(id)?null:cars.get(Integer.parseInt(""+id));// try to get by id
}
@ -225,6 +225,10 @@ public class Car extends BaseClass implements Comparable<Car>{
@@ -225,6 +225,10 @@ public class Car extends BaseClass implements Comparable<Car>{
@ -127,7 +127,8 @@ public class Locomotive extends Car implements Constants,Device{
@@ -127,7 +127,8 @@ public class Locomotive extends Car implements Constants,Device{
publicObjectfaster(intsteps){
returnsetSpeed(speed+steps);
setSpeed(speed+steps);
returnproperties();
}
publicstaticLocomotiveget(Objectid){
@ -286,7 +287,7 @@ public class Locomotive extends Car implements Constants,Device{
@@ -286,7 +287,7 @@ public class Locomotive extends Car implements Constants,Device{