O bject O riented P rogramming ( OOP ) is a program substitution class where the complete software operates as a crowd of objects talking to each other. An object is a collection of data and methods that operate on its data. 2. Why OOP?
The main advantage of OOP is better accomplishable code that covers following. 1 ) The overall sympathize of the software is increased as the distance between the speech spoken by developers and that spoken by users.
2 ) Object predilection eases maintenance by the function of encapsulation. One can easily change the implicit in representation by keeping the methods lapp.
OOP prototype is chiefly useful for relatively big software.
3. What are main features of OOP?
Inheritance 4. What is encapsulation?
Encapsulation is referred to one of the pursuit two notions.
1 ) Data hiding : A linguistic process have to restrict access to members of an aim. For example, private and protected members in C++.
2 ) bundling of data and methods together : Data and methods that operate on that data are bundled together. 5. What is Polymorphism? How is it supported by C++?
Polymorphism means that some code or operations or objects behave differently in different context. In C++, following features hold polymorphism. Compile Time Polymorphism: Compile time polymorphism means compiler knows which function should be called when a polymorphic predict is made. C++ supports compiler time polymorphism by supporting features like templates, function overload and default arguments. Run Time Polymorphism: Run time polymorphism is supported by virtual functions . The idea is, virtual functions are called according to the type of object pointed or referred, not according to the type of arrow or address. In other words, virtual functions are resolved late, at runtime. 6. What is Inheritance ? What is the purpose?
The idea of inheritance is dim-witted, a course is based on another class and uses data and implementation of the other class.
The purpose of inheritance is Code Reuse. 7. What is Abstraction?
Abstraction is like to data encapsulation and very significant in OOP. It shows alone the necessary information and hides the other irrelevant information. abstraction is implemented using Abstraction classes and interfaces. The problems in Abstraction are solved at design or interface flush. 8. What is Constructor? Constructor is a parry of code that initializes the newly created object. A builder resembles an example method in java but it ’ s not a method as it doesn ’ t have a return type. 9. What are Manipulators? Manipulators are the functions which can be used in junction with the interpolation ( < < ) and origin ( > > ) operators on an object. Examples are endl and setw. 10. What is destructor? A destructor is a method which is mechanically called when the object is made of setting or destroyed. Destructor appoint is besides like as class name but with the tilde symbol before the appoint. You may like to see following: normally Asked C Programming Interview Questions | Set 1
Read more: Top 6 question ask at an interview in 2022
normally Asked C Programming Interview Questions | Set 2 Amazon ’ s most ask interview questions Microsoft ’ s most ask consultation questions Accenture ’ s most ask Interview Questions normally Asked OOP Interview Questions normally Asked C++ Interview Questions normally asked DBMS interview questions | Set 1 normally asked DBMS interview questions | Set 2 normally Asked Operating Systems Interview Questions | Set 1 normally Asked Data Structure Interview Questions. normally Asked Algorithm Interview Questions normally asked Computer Networks Interview Questions top 10 algorithm in Interview Questions We will soon be covering more OOP Questions. Please write comments if you find anything incorrect, or you want to share more information about the subject discussed above.
My Personal Notes