Overloading and Overriding are the concepts of Polymorphism. In 'overloading' we redefine a function of a class with the same name but with, different numbers and types of parameters. In the 'overriding' prototype the overridden function is the same throughout the program but, the function to be overridden is preceded by the keyword 'virtual' in the base class and is redefined by the derived class without any keyword. Polymorphism is one of the crucial features of OOP. It simply means … [Read more...]
Difference Between Constructor and Destructor
Constructor and destructor are the member functions with the same name as their class. The former type constructor helps in initializing an object. Conversely, a destructor is different from the constructor which deletes the created constructor when it is of no use. Sometimes it is required to initialize some part of an object before it can be utilized. For example, we are operating on the stack, before we perform any action, the top of the stack must always be set to zero. This feature of … [Read more...]
Difference Between OOP and POP
Procedure-oriented Programming(POP) and Object-oriented programming(OOP) both are the programming approaches, which uses high-level language for programming. A program can be written in both the languages, but if the task is highly complex, OOP operates well as compared to POP. In POP, the ‘data security’ is at risk as data freely moves in the program, as well as, ‘code reusability’ is not achieved which makes the programming lengthy, and hard to understand. Large programs lead to more bugs, … [Read more...]
Difference Between Single and Multiple Inheritance
Inheritance is a method which can derive or construct new classes from the existing class. Here our main topic of discussion is the difference between single inheritance and multiple inheritance, two types of inheritance. In single inheritance, we do have only one base class, which is inherited by only one derived class. In multiple inheritance we have more than two base class which are combinely inherited by only one derived class. Inheritance strongly supports the concept of reusability, … [Read more...]
- « Previous Page
- 1
- …
- 10
- 11
- 12