What are the various elements of OOP?Following are the various elements of OOP:-
Class:- A class is a collection of data and the various operations that can be performed on that data.
Object- This is the basic unit that are associated with the data and methods of a class. To access any element of a class, an object is used.
Method:- describes the objects abilities. For example find_salary().
Instance:- An instance is the actual object created at run time. For example the salary of an employee John like john.find_salary(). Here, John is an instance.
What are the various elements of OOP? Various elements of OOP are:
- Information Hiding
What are the fundamental concepts of object-oriented technology? Explain them, i.e. Object, Classes and inheritanceClass – A class is a collection of data and operations on data. Data and operations / functions / methods are placed together in a single unit, i.e., class. This feature is known as encapsulation.
Objects – A class is like a blue print of a building. An object is the building itself. Technically speaking, an object is the real entity of a specific class, which involves in real operations of an OOP application.
Inheritance: The properties of one class can be used by another class in a best way, and the class can be extended as the need may be. This feature is known as Inheritance.