Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7612991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:03:33+00:00 2026-05-31T02:03:33+00:00

Possible Duplicate: Interface vs Abstract Class (general OO) Following are the confusions which I

  • 0

Possible Duplicate:
Interface vs Abstract Class (general OO)

Following are the confusions which I have between interface, abstract and normal class-

  1. I know an abstract class can have a method with no implementation, but what is the harm in declaring method as virtual in base class with some dummy implementation and over ride in derived class. Looking for a practical scenario where answer can be validated?

  2. Why we need an interface when we have abstract class, I know with interface we can have multiple inheritance, and have goggled about various theoretical reasons, looking for practical scenarios where abstract class just cant help and you have to go for interface?

  3. Is having an abstract class and interface is not an overhead?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:03:34+00:00Added an answer on May 31, 2026 at 2:03 am

    Practical Examples

    I think you are thinking too hard. Its like looking at a fork and a spoon and worrying about when to use when. There is no right answer, just use the one that makes sense to you for what you are doing. Many paths to getting there.

    Here is how I use these in the real world (fortune 500 companies etc…)

    Interfaces allow you to add as many as you want to a class. They essentially allow you to bind to any contract as much as you want. They are as minimal as you get. An example I used this in was a music encoder service where it just had some simple properties and methods that each encoder type needed. I later added more interfaces as other requirements came into play but I didn’t want to break the code for other parts not needing to know or care about the new interface. The encoders were very loosely coupled and could have more than one contract so this made sense for me. The main thing about interfaces is when you use them, don’t keep changing them as it defeats the purpose of the interface, rather make a new one. Interfaces are the best for plugin type of development.

    Abstract classes are kind of cool because you can have some base implementation already cooked in there but you are essentially saying "but you still have to make this part" as its the responsibility of the class to implement this. This could be for a "save" method for example. Let’s say you had some abstract class that handled data in the same way but you had many commonalities in the underlying abstract class that did a lot of work but you had a requirement that each inherited type save its own data in its own format needed for example. This could relate to a networked item that saved things in facebook and twitter or another item that saved things in a database and a file system but the core code always hit a central db to say it was saved with last date modified.

    So sorry, I was bored, lots of typing. But that’s how I have used them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Interface vs Abstract Class (general OO) When to use abstract class or
Possible Duplicate: Why would one declare a Java interface method as abstract? The following
Possible Duplicate: Interface vs Abstract Class (general OO) I'm not exactly clear on the
Possible Duplicate: Interface vs Abstract Class (general OO) Hi guys, I decided to dig
Possible Duplicate: PHP: What is the difference between an interface and abstract class? As
Possible Duplicates: interface and abstract class. Abstract classes vs Interfaces Can anyone tell me
Possible Duplicate: Static members class vs. normal c-like interface I am looking at somebodies
Possible Duplicate: Why can't I have protected interface members? as title, in C#. Is
Possible Duplicate: Why would one declare a Java interface method as abstract? I found
Possible Duplicate: IDisposable Question I have written a class and implemented the IDisposable interface.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.