Tell me the scenario,Where we can use interfaces or
Abstract class.And What is the difference between
interfaces and abstract class?

Answer Posted / bhavani

The whole reason you have a special Interface type-category
in addition to abstract base classes in C#/Java is because
C#/Java do not support multiple inheritance.

C++ supports multiple inheritance, and so a special type
isn't needed. An abstract base class with no non-abstract
methods is functionally equivalent to a C#/Java interface.

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is encapsulation used?

577


Which method cannot be overridden?

580


What is the purpose of enum?

583


How do you define a class in oop?

628


What is the difference between abstraction and polymorphism?

617






what's the basic's in dot net

1740


What is polymorphism and its types?

597


What is abstraction and encapsulation?

575


What is difference between abstraction and encapsulation?

594


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6153


What is the importance of oop?

611


What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?

2106


Whats oop mean?

595


#include #include #include #include void select(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); select(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void select(char *items, int count) { register int a, b, c; int exchange; char t; for(a = 0; a < count-1; ++a) { exchange = 0; c = a; t = items[ a ]; for(b = a + 1; b < count; ++b) { if(items[ b ] < t) { c = b; t = items[ b ]; exchange = 1; } } if(exchange) { items[ c ] = items[ a ]; items[ a ] = t; } } } design an algorithm for Selection Sort

2068


What is abstract class in oops?

600