abstract class vs. interface (coursework)

Posted on 2011-04-20
Last Modified: 2012-05-11

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.
Question by:AbhiJeet

    Author Comment

    The theory should be relevant to delphi only.
    LVL 36

    Accepted Solution

    this looks a lot like homework

    abstract class:


    scenario ?
    you can always use either

    yes it can be called as any class descends from TObject
    and this contains a constructor per default
    interface is just a placeholder for functions/procedures

    LVL 36

    Assisted Solution

    by:Geert Gruwez
    LVL 22

    Expert Comment

    Definitely sounds like either homework or a take-home test. ;-)

    Expert Comment

    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
    LVL 36

    Expert Comment

    by:Geert Gruwez
    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

    LVL 36

    Expert Comment

    by:Geert Gruwez
    aikimark ...
    you scared this person away before getting an answer
    LVL 44

    Expert Comment


    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.
    LVL 100

    Expert Comment

    This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
    Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now