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 |
Write 7 differences between "Public" function and "Private" function?
Explain the concepts involved in Object Oriented programming.
What is the highest level of cohesion?
design class for linked list and include constructor,destructor,insert option. struct node { int node; struct node &ptr; }
write a program which best describes polymorphism in real world?
2 Answers CTS, Infosys, NexGen,
What is byval and byref? What are differences between them?
What is namespace?
What is overloading in oop?
What is a template?
What does and I oop mean?
What does <> mean pseudocode?
Program to check whether a word starts with a capital letter or not.