web analytics


What is OOPS?

OOPS stands for Object-oriented programming language. The object Oriented programming language is a programming style that is associated with the concept of Class,  Objects and various concepts like Inheritance, Polymorphism, Abstraction, Encapsulation etc.

What are the features of OOPS?

The features of oops are:

  1. Objects
  2. Classes
  3. Abstraction
  4. Encapsulation
  5. Inheritance
  6. Overloading
  7. Exception Handling

What is Class?

Class is similar to the structure in C. class is the combination of data member and member function. Class is basically used to design the blueprint or architecture. Class is used to create user-defined data types. Class does not allocate memory.

What is object?

Objects are the basic unit of OOPS. They are instances of the class, which have data members and uses various member functions to perform tasks. Class does not allocate memory, but objects allocate memory. Inside the object data member allocates memory but member functions does not allocate memory.

What is abstraction?

Abstraction refers to showing only the essential features of the application and hiding the details. In C++, classes provide methods to the outside the program to access & use the data variables, but the variables are hidden from direct access. This can be done by the access specifiers.

What is encapsulation?

The binding of related information and operation into a single unit is known as encapsulation.

To achieve the encapsulation class concept is required.

What is inheritance?

Deriving a new class from an existing class is known as inheritance.

The existing calls are known as the base class or parent class and the new class is known as the derived class or child class.

Inheritance is basically used to reuse the data member and member function of one class in another class.

What is polymorphism?

The word polymorphism means having many forms.

Polymorphism is one of the very important part and features of OOPS.

Basically, polymorphism is of two types:-

  1. compile time polymorphism
    1. method overloading
    2. constructor overloading
  2. runtime polymorphism
    1. method overriding
    2. method hiding

What is exception handling?

Exception handling is a feature of OOP, to handle unresolved exceptions or errors produced at runtime.

To implement exception handling in c++ try, catch, throw keyword are used.

Related Posts

Leave a Reply

Your email address will not be published.