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

  • Home
  • SEARCH
  • 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 585503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:00:35+00:00 2026-05-13T15:00:35+00:00

When designing my software, I began with interfaces since this seems to be the

  • 0

When designing my software, I began with interfaces since this seems to be the “standard”. Then I switched to abstract classes because they seem better suited to the problem at hand. However I’m not sure if I’ve missed out on some considerations when making this design choice. Other than domain specific issues which I have thought about what are the more general factors to consider when choosing between interfaces and abstracts classes?

  • 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-13T15:00:35+00:00Added an answer on May 13, 2026 at 3:00 pm

    I find the best option most of the time is to do both. That is not always possible when you are relying on something happening in the base class . Providing both an abstract base class and an interface allows the greatest latitude by implementers of your abstraction, again, as long as you don’t require something happens by an implementer of the interface. If you require that something happens, then you don’t want to provide an interface at all–and you would also need to make sure that your base class ensures this required action to ALWAYS occur…

    Negative to doing both: more goo.

    example pseudocode:

    interface IVehicle
    {
        void PutCarInGear(Int speed);
    }
    
    abstract class Vehicle : IVehicle
    {
        public void PutCarInGear(Int speed)
        {
            //base implementation
        }
    }
    

    Note that in this example, someone could make their own class that implements IVehicle and then pass it to anything that takes an IVehicle. That object would NOT need to be a child of the Vehicle abstract class. If, therefore, you were to expect something specific to happen in the PutCarInGear() method, it’s quite likely that that new class would NOT fulfill that expectation. However, as long as it never matters what implementations of IVehicle do, then it’s the most flexible abstraction to have both an abstract base class AND an interface.

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

Sidebar

Related Questions

Background: I am designing a software application that reads millions or much more files
What are good principles in designing a software library for the use of scientists
I am designing a piece of software that needs to operate different pieces of
We have a large SQL driven software system which has been around since Delphi
I need to develop an interior designing software :) Much like a virtual room
I'm designing a software. I want to store the times a user visits a
I'm designing a software component which will get instructions from other components on how
I am currently in the process of designing an interface for .NET software that
I'm designing (and developing) web software that will allow the general public to sign
usually people when designing proper software architectures on c++ that also need to have

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.