Code Skiller logoCB Logo
Logo LearnLearnLogo PracticePracticeLogo HireHireLogo IDEIDE

Terminologies of OOPS

User image

Published by

sanya sanya

Published at: 6th Aug, 2023
2.22 mins read

1. Class: A blueprint or a template for creating objects. It specifies the properties (data members) and behaviors (member functions) that things belonging to that class will have.

2. Object: An instance of a class created using the class blueprint. Objects represent individual entities with their own state and behavior.

3. Encapsulation: the idea of grouping together methods (functions) and data (attributes) that operate on the data into a single unit, or class. It hides the internal implementation details from the outside and provides access through public interfaces.

4. Abstraction: The process of hiding the implementation details of an object and exposing only the relevant features and functionalities to the outside world.

5. Inheritance: The process by which a new class (derived class) is created from an existing class (base class). The derived class inherits the properties and behaviors of the base class and can extend or modify them as needed.

6. Base Class: The original class from which a derived class is created. It is also known as a parent class.

7. Derived Class: The new class created from a base class. It is also known as a child class.

8. Polymorphism: The ability of different objects to respond in a unified way to a common interface. This can be achieved through function overloading and virtual functions.

9. Function Overloading: Defining multiple functions with the same name but different parameters. Based on the inputs given during the function call, the compiler chooses which function to call.

10. Virtual Function: A function declared in the base class with the "virtual" keyword. It allows the function to be overridden in the derived class, enabling dynamic binding at runtime.

11. Abstract Class: A class that contains one or more pure virtual functions. An instance cannot be created for an abstract class but serves as a base for other classes.

12. Pure Virtual Function: A virtual function declared in the base class without any implementation (no function body). It is meant to be overridden in the derived class, making the base class abstract.

13. Constructor: A special member function with the same name as the class, used to initialize the object's state when it is created.

14. Destructor: A special member function with the same name as the class preceded by a tilde (~). It is used to clean up resources and perform necessary actions when an object is destroyed.

15. Public, Private, and Protected: Access specifiers used in class definitions to control the visibility of class members. Public members are accessible from outside the class, private members are only accessible within the class itself, and protected members are accessible within the class and its derived classes.

Library

WEB DEVELOPMENT

FAANG QUESTIONS