What is the Advantage of Interface over the Inheritance in
OOPS?
Answers were Sorted based on User's Feedback
Answer / mms zubeir
1. Provides flexibility in implementing the operations for
the derived classes.
2. Avoid conflicts when more than one interfaces are
derived in a class.
I will club some more later...
Is This Answer Correct ? | 28 Yes | 9 No |
Answer / iyappan_protech
1)Interface totally keeps away that implementation
knowledge from client.
2)It supports us to change their behaviour dynamically.It
means that, it will act depends on dynamic specilization(or
substitution).
3)This gives very good abstraction about the object to
client.
4)It avoids client broken, even developer made some changes
on implimentation or add new specilization(new
implementation).
5)So it gives open way to extend and implementation.
Is This Answer Correct ? | 16 Yes | 11 No |
Answer / poorna chandar rao
in inheritence is not support the multiple inhertence but
interface is supported multiple inhertence because imterface
is advatage over the inhertience
Is This Answer Correct ? | 8 Yes | 10 No |
Answer / rajendra patidar
On OOPS due to multiple inheritance duplicate value may be
received by derived class, so compiler do not understand
what syntax should compile.
Interface Refuse such type of problem in java.
Is This Answer Correct ? | 0 Yes | 4 No |
What type of Job you are providing?
write a c++ code to overload + and - for a stack class such that + provides push and - provides pop operation
1 Answers College School Exams Tests, HCL, IBM, TCS,
create a class complex having real and imaginary part of a complex no. as a data member. overload the binary operators(+,- and *) to perform the operations on complex no. objects. overload binary operator using friend function.
2 Answers CTS, Delhi University,
Write an operator overloading program to Overload ‘>’ operator so as to find greater among two instances of the class.
What do you mean by abstraction?
what is pointers
The IT giant Tirnop has recently crossed a head count of 150000 and earnings of $7 billion. As one of the forerunners in the technology front, Tirnop continues to lead the way in products and services in India. At Tirnop, all programmers are equal in every respect. They receive identical salaries and also write code at the same rate. Suppose 14 such programmers take 14 minutes to write 14 lines of code in total. How long will in take 5 programmers to write 5 lines of code in total ?
#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; wow *b; a.x = 22; b = &a; a.x = 23; cout << b->x; return 0; }
Why is destructor used?
What is polymorphism what is it for and how is it used?
OOP'S advantages of inheritance include:
explain dynamic binding by drowing