Object Oriented Programming C++ Lecture No 11
Outline Why Operator Overloading? Limitations Overloading the + Operator Overloading the Assignment Operator Copy Constructor and Assignment Operator Why Operator
Read moreOutline Why Operator Overloading? Limitations Overloading the + Operator Overloading the Assignment Operator Copy Constructor and Assignment Operator Why Operator
Read moreOutline Operator overloading Overloading less than (<) operator Implementing full support for an operator Operator Overloading How we can
Read moreOutline Friends The friend functions of a class friend Classes Friends Normally, we declare class data as private. The
Read moreOutline Variables and storage classes static data members static member functions static object Variables and Storage Classes The storage class
Read moreOutline The this pointer const member functions const member function arguments const objects const data members The ‘this’ Pointer
1 2 3 4 5 6 7 8 9 10 |
class Box{ private: double length; double breadth; double height; public: Box(double l=1.0,double b=1.0,double h=1.0); double volume(); int compareVolume(Box); }; |
Outline Arrays of objects Memory management: the new and delete operators Defining dynamic objects Pointer to object Reference to object
Read moreOutline Introducing Constructor Default Constructor Initializer List Overloaded Constructors The Default Copy Constructor Destructor Default Initialization Values Constructors vs. Setters
Read moreOutline Some C++ Terminology Data Hiding Access Specifiers Objects as Function Arguments Returning Objects from Functions Classes vs. Structures Classes,
Read moreOutline Moving towards functionality Class – Definition, syntax, example Class, Class members, and objects What you can do with objects
Read moreOutline Structures (Refreshing the Concepts) Combining Data into Structures C++ allows you to group several variables of relevance into a
Read more