What is differance between Abstract and Interface
Answers were Sorted based on User's Feedback
Answer / jasbir singh
An abstract class is a class with at least one function
without definitions.
An Interface is a class which only contains function
declarations, all the functions are specifically and
separately defined later. And you can't create objects of
these classes.
| Is This Answer Correct ? | 12 Yes | 1 No |
Answer / poorna chandar rao
diffrence bettwen the abstract class and interfaces
abstract class is having abstarct methods and concrete
methods abstarct class as compulosry having subclass for the
implementation abstarct methods and abstarct does not
support multiple inheritence
because one subclass extend the abstract class their is no
scope for extends for another class because it is not
support for the multiple inheritence
ex 1: abstract class one
2 class two extends one extend three (not valid)
but interface having only method signature in the interface
their is concrete method and it supports the multiple
inhirtence because
ex: interface one
class two implements one extends three(valid)
onc class implemens the interface and extends to another
class that is support the multiple inhertince
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / pankaj kumar upadhyay
abstract class contain an abstract function as well asather functions and variableand it must be defind in derived class and here we no create an object,
ex:
an SBI bank which follow the RBI Rules including it own rules.
while an interface class can contain only an abstract function, not any other functions or variables butit also must be defined in derive class .here also we dont create ao object.
ex:
an RBI follow only itself rules
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the correct syntax for inheritance? 1) class aclass : public superclass 2) class aclass inherit superclass 3) class aclass <-superclass
write a c++ code of diagonal matrix.
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
How is data security provided in Object Oriented languages? ?
write a program in c++ to overload the function add (s1,s2) where s1 and s2 are integers and floating point values.
Why do we use class in oops?
What is a class in oop?
what is the main difference between c and c++?
386 Answers AZTEC, B.Tech, CMC, College School Exams Tests, HCL, IBM, ITM, Khalsa Institute, Microsoft, Oracle, Sanjeevni Institute, TCS, Tech Mahindra, Wipro, ZeOmega,
What is the types of inheritance?
What is the difference between and interface and an abstract class ?
4 Answers IBM, Infosys, Ness Technologies,
create a c++ program that will ask 10 numbers and display their sum using array.
how much classes are used in c++