Link to home
Start Free TrialLog in
Avatar of AbhiJeet
AbhiJeet

asked on

abstract class vs. interface (coursework)

Experts,

Need expert comments on Abstract class vs Interface, i need full description covering ,

1. all the differeces between abstract class and interface
2. advantages, disadvantages of both
3. which scenario to use one or the other
4. Can abstract class contain constructor, if so can it be called? same for interface?
I need whole theory part for the both.
Avatar of AbhiJeet
AbhiJeet

ASKER

The theory should be relevant to delphi only.
ASKER CERTIFIED SOLUTION
Avatar of Geert G
Geert G
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Definitely sounds like either homework or a take-home test. ;-)
The question you asking makes nosense abstract class are class that only have body and are completly virtual. The only think that is define is the methods names and procedure, function of class.
The abstract class must have in some point a derivation to another where you define procedures and functions vars in and out.

A interface is a completly diferent thing. I will not write more because i think you get the point.

abstract class vs. interface question = MAKES NOSENSE
there is actually a little sense to it :)

with abstract you can specify which function/procedure must be overridden
it could be just the 1

with interface you need to implement all function/procedure

writing a interface for a thread would be a lot more work than deriving from a abstract class


in essence any class becomes an abstract class if at least 1 member is abstract

aikimark ...
you scared this person away before getting an answer
@Geert

We haven't seen a comment since
The theory should be relevant to delphi only.

Open in new window


I doubt my comment scared anyone.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.