Features of OOP in C++
An overview of key object-oriented programming concepts in C++
Submitted to : Ms. Shalinee Pareek
Submitted by : Gulshan Kumar
(MUR2301513)
Introduction to OOP
 OOP stands for Object-Oriented Programming
 OOP models real-world entities as objects
 Objects contain data (attributes) and functions (methods)
 C++ fully supports OOP since C++11 standard
Classes and Objects
 A class is user defined blueprint or prototype from
 Objects are called instance of a class.
 Class represents set of properties and method.
 Objects can store state and exhibit behavior.
which objects are created.
Encapsulation
 Binding data and functions into a single unit is encapsulation
 Class attributes can be declared private
 Private attributes can only be accessed via public member
functions
 Prevents direct modification of object state
Abstraction
 Hiding internal implementation details
 Showing only essential features to user
 Achieved through abstract classes and interfaces
 Provides reusability
Inheritance
 Inheritance allows a derived class to acquire attributes and methods of a base
class
 Provides reusability of code
 Supported by public, protected and private inheritance
 Can be single, multilevel or multiple inheritance
Polymorphism
 Having many forms - one name, multiple implementations
 achieved through function overloading and overriding
 Compile-time polymorphism with function overloading
 Runtime polymorphism with virtual functions
Summary
 OOP makes code reusable and modular
 Classes, objects, inheritance and polymorphism are key concepts
 Abstractions like abstract classes hide details
 C++ fully supports OOP since C++11 standard
YOU
THANK

Features Of OOPS and characteristics.pptx

  • 2.
    Features of OOPin C++ An overview of key object-oriented programming concepts in C++ Submitted to : Ms. Shalinee Pareek Submitted by : Gulshan Kumar (MUR2301513)
  • 3.
    Introduction to OOP OOP stands for Object-Oriented Programming  OOP models real-world entities as objects  Objects contain data (attributes) and functions (methods)  C++ fully supports OOP since C++11 standard
  • 4.
    Classes and Objects A class is user defined blueprint or prototype from  Objects are called instance of a class.  Class represents set of properties and method.  Objects can store state and exhibit behavior. which objects are created.
  • 8.
    Encapsulation  Binding dataand functions into a single unit is encapsulation  Class attributes can be declared private  Private attributes can only be accessed via public member functions  Prevents direct modification of object state
  • 9.
    Abstraction  Hiding internalimplementation details  Showing only essential features to user  Achieved through abstract classes and interfaces  Provides reusability
  • 10.
    Inheritance  Inheritance allowsa derived class to acquire attributes and methods of a base class  Provides reusability of code  Supported by public, protected and private inheritance  Can be single, multilevel or multiple inheritance
  • 11.
    Polymorphism  Having manyforms - one name, multiple implementations  achieved through function overloading and overriding  Compile-time polymorphism with function overloading  Runtime polymorphism with virtual functions
  • 12.
    Summary  OOP makescode reusable and modular  Classes, objects, inheritance and polymorphism are key concepts  Abstractions like abstract classes hide details  C++ fully supports OOP since C++11 standard
  • 13.