Member Avatar

In my previous post I asked the forum to help me make a race with an existing program I had made. I figured out a way to do this but now I got an error and I cannot solve it.

If you need any additional information just ask ^_^

does your vehicleCMD class have a constructor that takes in a String as a param?

commented: Good catch :) +8
Member Avatar

does your vehicleCMD class have a constructor that takes in a String as a param?

I changed the classes' & objects' names because now they make more sense(:

Here is the code concerning the constructors. Again, if you need more information just ask.

Thanks, Jean

You have the keyword void in your constructor for the carCMD. Remove that and it should work

public carCMD(String carName){
        this.carName = carName;
}
Member Avatar

You have the keyword void in your constructor for the carCMD. Remove that and it should work

public carCMD(String carName){
        this.carName = carName;
}

Thanks for your help :)

I managed to finish up the program.
Here is a screenshot of the console.

Good job. Looks like team SMC had the car in reverse most of the race lol