object oriented language(OOPS) elements - List the elements of an object oriented language

List down elements of an object oriented language.

Class :
A class is a user defined data type. It serves as a template of the objects. You can define structure and behavior of an object using class. It includes data and the member functions that operate on data.

Inheritance :
Inheritance enables a new class to reuse the state and behavior of old class. The new class inherits properties and methods from the old class and is called as derived class and the old class is called as base class. The methods thus inherited can be extended using overriding facility of C++.

Encapsulation :
The wrapping up of data and member function into an object is called encapsulation. The data is not accessible to the outside world and only those functions which are wrapped into the object can access it. An encapsulated objects act as a "black box" for other parts of the program which interact with it. They provide a service, but the calling objects do not need to know the details how the service is accomplished.

Polymorphism :
Polymorphism enables one common interface for many implementations, and for objects to act differently under different circumstances. You can also achieve polymorphism in C++ by function overloading, operator overloading and implementation inheritance.

What are the characteristics of Object Oriented programming language?

Some key features of the Object Oriented programming are :

- Emphasis on data rather than procedure.
- Programs are divided into entities known as objects.
- Data Structures are designed such that they characterize objects.
- Functions that operate on data of an object are tied together in data structures.
- Data is hidden and cannot be accessed by external functions.
- Objects communicate with each other through functions.
- New data and functions can be easily added whenever necessary.
- Follows bottom up design in program design.

What are the basic concepts used in the Object-Oriented Programming language?

- Object
- Class
- Data Abstraction and Encapsulation
- Polymorphism
- Inheritance
- Message passing
- Dynamic binding
C++ constructors & destructors related inteview questions and answers
C++ constructors and destructors - Explain the use of Constructors, Explain the use of Destructors, Explain constructors and destructors, What are constructors?, What is a destructor?
C++ access privileges - Define access privileges in C++.
C++ access privileges - You have access privileges in C++ such as public, protected and private that helps in encapsulation of data..
C++ Structures and Classes - Explain the difference between structures and classes.
C++ Structures and Classes - Syntactically and functionally, both structures and classes are identical. By default, members of structures..
Post your comment