Why does my Car class have to have a "getType"Because you're trying to call getType on a Car object.
Just because I am extending Car class fromIf Ford extends Car, then Ford inherits all of Car's non-private methods. But neither Car nor Ford has getType. Only Test does.
Ford class, I didn't think they needed the same
Also, is this the best approach for what I am tryingThis looks to me to be a very dangerous way of doing things. As I see things, you have no guarantee that an object in the cars ArrayList will be a Ford. If you try to cast a non-Ford object as a Ford, the system will come crashing down. If Car is abstract and all classes subclassed from Car will have a getType method, then call Car abstract and put in an abstract getType method in it. Then no cast will be needed and you will allow polymorphism to do its magic if and when needed.
to accomplish? Or is there a much cleaner way of