T
Thomas Mercer-Hursh
Guest
Why do you need to cast or new anything. Any subclass can be treated as one of its superclasses as long as one confines oneself to the methods and properties of the superclass. E.g., one can have a method in some class which has a parameter defined as the superclass and then call that method passing in any of the subclasses of that superclass. And, as has been hinted, one can define the message in terms of an interface and pass in any object which supports that interface.
Continue reading...
Continue reading...