A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
- Raj<br />[MCSE, SCJP, SCWCD]
Originally posted by Stan James:
I'm guessing that if the super class is "Animal" they'd say a good subclass would be "FurryAnimal". But "Mammal" just might be better. Maybe they'd like "MammalianAnimal"? Ack!
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by HS Thomas:
An abstract class contains no code
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Math class is non-instantiable. But i don't think that qualifies them as abstract classes.
Originally posted by Jayadev Pulaparty:
Also having abstract classes with empty methods is not the best of approaches IMO. Abstract classes are supposed to present some abstract behaviour (provided by the methods), which the child concrete classes are going to consolidate upon.
I also agree that it is C++ way of defining an interface, having an abstract class with all pure virtual functions (no body).
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
That's because C++ has multiple inheritance for classes, and so doesn't need the concept of interfaces.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Don't get me started about those stupid light bulbs. |