Linked Questions
12 questions linked to/from Interfaces vs. abstract classes
845 votes
38 answers
208k views
Interface vs Base class
When should I use an interface and when should I use a base class? Should it always be an interface if I don't want to actually define a base implementation of the methods? If I have a Dog and Cat ...
23 votes
3 answers
27k views
How do you decide between using an Abstract Class and an Interface? [duplicate]
I have been getting deeper into the world of OOP, design patterns, and actionscript 3 and I am still curious how to know when to use an Abstract class (pseudo for AS3 which doesn't support Abstract ...
0 votes
1 answer
2k views
Why do we need abstract classes when we can use interfaces in C#? [duplicate]
From what I understand, an abstract class provides a framework of members with no body and enables its subclasses to each implements its own members. But a class cannot inherit from more than one base ...
-1 votes
2 answers
596 views
Questions about Abstract method and interface method [duplicate]
Hi all i have some doubts about abstract class and interface Am not asking about difference between interface and abstract class . Am just asking about different between abstract method and interface ...
1579 votes
34 answers
827k views
Interface vs Abstract Class (general OO)
I have recently had two telephone interviews where I've been asked about the differences between an Interface and an Abstract class. I have explained every aspect of them I could think of, but it ...
113 votes
15 answers
118k views
Abstract class vs Interface in Java
I was asked a question, I wanted to get my answer reviewed here. Q: In which scenario it is more appropriate to extend an abstract class rather than implementing the interface(s)? A: If we are using ...
1 vote
5 answers
2k views
Interface vs Abstract Class with an empty method [closed]
I'm trying to understand when I should use an interface vs an abstract class. I was looking at improving my MVC application design and came across this article: http://www.codeproject.com/Articles/...
0 votes
2 answers
1k views
C# error cs0534: does not implement abstract member get - although I do
I am new to c#. I got an interface that I need to implement, including this line in the interface: public abstract IEnumerable<CardData> AllCards { get; } In my implementation I have this ...
0 votes
1 answer
476 views
Unable to define a set with abstract get [duplicate]
I have a problem with an accessor inherited, I can't define the set method. My code : public abstract class MotherOfDragons { public abstract String DragonsName { get; } } the classes inherited :...
0 votes
1 answer
209 views
Why override keyword is used to implement abstract method of an abstract class but not to implement interface members?
Look at this code. public abstract class Customer { public abstract void Print(); } class Program : Customer { public override void Print() { Console.WriteLine("Print Method");...
1 vote
2 answers
217 views
When should I use interface/abstract class and when should I not? [closed]
We all know that interfaces and abstract classes are needed for many design principles, and were told to be "the best practice" of programming, both for maintenance and expansion purposes. ...
-1 votes
1 answer
128 views
How to improve design of the program considering interfaces and abstract classes?
Taking into account the accepted answer here, the idea for general recommendations is that, where possible, favor defining classes over interfaces. Consider the following design: A base class ...