我对java很陌生,无法弄清楚!这就是它的样子,但它给了我一个错误,我不确定我是否必须转换它!或者我做错了什么!!!
这是我的要求:使用提供的车辆数据为变量赋值。有关访问这些车辆数据值的信息,请参阅数据文件布局信息。1.速度
public class Bicycle extends Vehicle implements IOutput {
private static int speeds;
public Bicycle(String[] vehicleData) {
super(vehicleData,speeds); // get error: The constructor Vehicle(String[], int) is undefined
// or i should this one :
speeds = Convert.toInteger(vehicleData[0]);
}
这是车辆类别
public Vehicle(String[] vehicleData) {
count++;
owner= new Owner(vehicleData);
setVehicleType(Convert.toInteger(vehicleData[0]));
make = vehicleData[1];
model = vehicleData[2];
color = vehicleData[3];
purchaseDate = vehicleData[4];
cost = Convert.toDouble(vehicleData[5]);
}