September 02, 2003
"Philippe Mori" <philippe_mori@hotmail.com> wrote in message
news:bj1056$elk$1@digitaldaemon.com...
|
| As it, IMO, there are no differences between the abstract class and the
| interface but there will be difference if you want data member or MI.
|
| - You can derives from multiples interface but only one class (abstract or
| not).
| - An interface cannot have any data member but an abstract class can.
| - An abstract class will probably allows to define member functions as
| mentionned elsewhere.
|
| So the main difference would be the intended use. An abstract class
| might serve as the base class of a class hierarchy and offer some services
| to derives classes. An interface only declare function that need to be
| implemented to support it...
|

Yes, that I understand: that's the difference between interfaces and abstract classes, but I was talking that specific case where both an abstract class and an interface where declared exactly the same.

————————————————————————— Carlos Santander


---

Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.515 / Virus Database: 313 - Release Date: 2003-09-01


September 02, 2003
>
> Yes, that I understand: that's the difference between interfaces and abstract classes, but I was talking that specific case where both an abstract class and an interface where declared exactly the same.
>

In this case, the difference is just that one is abstract and the other an
interface. In that case, maybe you should choose to use an interface,
as you then keep the superclass slot open for the class inheriting.

I think the concept of abstract classes is useful mostly when theyre partially or fully implemented.

Lars Ivar


1 2 3
Next ›   Last »