In which Scenario you will go for Interface or Abstract Class?
Interfaces, like classes, define a set of properties,
methods, and events. But unlike classes, interfaces do not
provide implementation. They are implemented by classes,
and defined as separate entities from classes. Even though
class inheritance allows your classes to inherit
implementation from a base class, it also forces you to
make most of your design decisions when the class is first
published.
Abstract classes are useful when creating components
because they allow you specify an invariant level of
functionality in some methods, but leave the implementation
of other methods until a specific implementation of that
class is needed. They also version well, because if
additional functionality is needed in derived classes, it
can be added to the base class without breaking code.
Is This Answer Correct ? | 12 Yes | 2 No |
WHAT'S THE OOPS BASIC OOPS CONCEPTS IN DOTNET
what is multithreading in c++ , what is difference between multithreading and singlethreading.
write a short note on Overloading of Binary Operator?
What are the four main oops concepts?
What is encapsulation process?
How to improve object oriented design skills?
write a c++ program to find maximum of two numbers using inline functions.
I am DeePu sotware engineer working with EMC corporation ,recently I had attended mcafee interview . Their questions were at heights of stupidity , I don't know what they want , I am a developer with 4 year experienced .I am listing the questions asked 1:What is the flag in g++ to avoid structure padding 2:In wht order parameters are passed to stack 3:How you will edit code segment of an exe
What is multidimensional array?
what is the difference between class and structure in C++?
what is code for call by value and call by reference?
Why is encapsulation used?