Right I knew that but my question is say if I have an array of people of length 3. I want to call the print() method for each position of the array, but each position is from a different sub class,...
Type: Posts; User: EDale
Right I knew that but my question is say if I have an array of people of length 3. I want to call the print() method for each position of the array, but each position is from a different sub class,...
print() is defined in Person and all three subclasses. So when I am going through this loop, the object may be from subclass Oldie, and the next may be from subclass CollegeKid. So if I need to call...
All it says is that it cannot find the symbol method print() so no it doesnt execute.
My only problem with exercises like this is that I don't know how to call a method of a specific subclass. I...
Hey guys, I'm stuck on this problem and I'm getting absolutely nowhere with it.
Our Person class has several subclasses, namely CollegeKid and Oldie. Suppose there is yet another subclass:...