posted 12 years ago
I know instanceOf is what it's for but i was told not to use it.
Here is my code:
basically when i use the printGradStudent() method it should print out only the grad students. However to do this it must be able to differentiate which is a grad student and which is a undergrad student.
The method is not completed yet b/c i had to change it or it wouldn't compile.
I was thiniking of justing making a boolean variable in printGradStudent() and send that to super class (Student) in order to determine if the object is of type GraduateStudent
Thanks