That is my project that I've just started. I would like to thank anyone in advance for any help.
I'm still on part 1 right now. my first question is about the Vehicle class. I'm supposed to include the method [b]public abstract String getType();[/b]
--since it's an abstract method, the Vehicle class would have to abstract itself, correct? if the Vehicle class is abstract, then how can I instantiate Vehicle object in the VehicleTester class? I thought you were allowed to instantiate objects from abstract classes, yet the instructions include "[italic]test the Vehicle and Car classes by constructing several instances of
vehicles and cars, and printing enough information to test the accessor and toString
methods of these classes."[/italic]
My second question is about the method [b]public int compareMakeTo(Vehicle other)[/b] which compares two vehicles on the alphabetic order of their makes. I'm not exactly sure how I'm supposed to compare the strings. right now i return [italic]getMake().compareTo(other.getMake());[/italic], though I really don't know if that's right...
Again, thanks for any help. I might have a few more questions in the future.