-
abstract methods/polymorphism
I have declared an abstract method in an abstract class at the top of a hierarchy.
Two more abstract classes derive from the parent class. Then two more concrete
classes derive off of each of the former two abstract classes, thus making
four concrete classes at the bottom of the hierarchy. The methods that are
being called by the abstract method is are at the bottom of the hierarchy,
how do I make the two intermediate classes of the hierarchy recognize this
abstract method so that the bottom classes of the hierarchy will recognize
the abstract method?
-
Re: abstract methods/polymorphism
Mark,
Sounds like you need to consider redesigning. If the top-level abstract class
needs to invoke methods defined in it's subclasses then this is a flawed
design.
Is it possible that the methods these abstract methods are invoking are relevant
to the top level class? If so, move them into the top level class and declare
them abstract.
Perhaps post some code to better illustrate...
Regards,
Kent
"Mark Destrampe" <mrdestra6008@webmail.winona.edu> wrote:
>
>I have declared an abstract method in an abstract class at the top of a
hierarchy.
> Two more abstract classes derive from the parent class. Then two more
concrete
>classes derive off of each of the former two abstract classes, thus making
>four concrete classes at the bottom of the hierarchy. The methods that
are
>being called by the abstract method is are at the bottom of the hierarchy,
>how do I make the two intermediate classes of the hierarchy recognize this
>abstract method so that the bottom classes of the hierarchy will recognize
>the abstract method?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks