class and object in c++.pptx

Adarsh College, Hingoli
Adarsh College, HingoliAssistant Professor um Adarsh College, Hingoli
Prof. R. S. Devhade
Assistant Professor, Department of Electronics
Adarsh College, Hingoli
Class
• A Class is a user-defined data type where we can bind data and its related functions
together. It allows the data and function to be hidden from external use or outside
the class.
• When defining a class, we are creating a new abstract data type that can be treated
like any other built in data type.
• Class is a group of objects that share common properties and relationships .
• In C++, a class is a new data type that contains member variables and member
functions that operates on the variables.
• A class is defined with the keyword class.
Syntax:
• The members that have been
declared as private can be accessed
only from with in the class.
• On the other hand , public members
can be accessed from outside the
class also.
• The data hiding is the key feature of
oops.
• The use of keywords private is
optional by default, the members of
a class are private.
• The variables declared inside the class are
known as data members and the functions are
known as members mid the functions.
• Only the member functions can have access to
the private data members and private
functions. However, the public members can
be accessed from the outside the class.
• The binding of data and functions together
into a single class type variable is referred to as
encapsulation.
Example:
Object
An object is an instance of a class. I simple words, we can say that an object is a variable of
type class.
The general syntax to create an object is:
classname object_name;
Once the object is created, it can be used to access the data members and functions of that
class.
Accessing the members of the class (data and functions) is done using the dot (.) operator,
which is also called as the member access operator.
class and object in c++.pptx
class and object in c++.pptx
THANK
YOU……
1 von 8

Recomendados

Classes and objects von
Classes and objectsClasses and objects
Classes and objectsLovely Professional University
84 views19 Folien
Friend function von
Friend functionFriend function
Friend functionHeet Patel
107 views11 Folien
[OOP - Lec 06] Classes and Objects von
[OOP - Lec 06] Classes and Objects[OOP - Lec 06] Classes and Objects
[OOP - Lec 06] Classes and ObjectsMuhammad Hammad Waseem
349 views17 Folien
APL-2-classes and objects.ppt von
APL-2-classes and objects.pptAPL-2-classes and objects.ppt
APL-2-classes and objects.pptsrividyal2
8 views52 Folien
4 Classes & Objects von
4 Classes & Objects4 Classes & Objects
4 Classes & Objectspraveenjigajinni
1K views49 Folien

Más contenido relacionado

Similar a class and object in c++.pptx

Oops von
OopsOops
OopsSankar Balasubramanian
1.8K views27 Folien
Classes and objects von
Classes and objectsClasses and objects
Classes and objectsAnil Kumar
5.9K views73 Folien
Concept of Object-Oriented in C++ von
Concept of Object-Oriented in C++Concept of Object-Oriented in C++
Concept of Object-Oriented in C++Abdullah Jan
545 views104 Folien

Similar a class and object in c++.pptx(20)

Classes and objects von Anil Kumar
Classes and objectsClasses and objects
Classes and objects
Anil Kumar5.9K views
Concept of Object-Oriented in C++ von Abdullah Jan
Concept of Object-Oriented in C++Concept of Object-Oriented in C++
Concept of Object-Oriented in C++
Abdullah Jan545 views
oops-123991513147-phpapp02.pdf von ArpitaJana28
oops-123991513147-phpapp02.pdfoops-123991513147-phpapp02.pdf
oops-123991513147-phpapp02.pdf
ArpitaJana280 views
OOP Unit 2 - Classes and Object von dkpawar
OOP Unit 2 - Classes and ObjectOOP Unit 2 - Classes and Object
OOP Unit 2 - Classes and Object
dkpawar400 views
Introduction to OOP with java von Sujit Kumar
Introduction to OOP with javaIntroduction to OOP with java
Introduction to OOP with java
Sujit Kumar149 views
Overview of Object-Oriented Concepts Characteristics by vikas jagtap von Vikas Jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtapOverview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
Vikas Jagtap1.5K views
Chapter18 class-and-objects von Deepak Singh
Chapter18 class-and-objectsChapter18 class-and-objects
Chapter18 class-and-objects
Deepak Singh155 views
Learn C# Programming - Classes & Inheritance von Eng Teong Cheah
Learn C# Programming - Classes & InheritanceLearn C# Programming - Classes & Inheritance
Learn C# Programming - Classes & Inheritance
Eng Teong Cheah126 views
Data members and member functions von Harsh Patel
Data members and member functionsData members and member functions
Data members and member functions
Harsh Patel10.3K views

Más de Adarsh College, Hingoli

microcontroller.pptx von
microcontroller.pptxmicrocontroller.pptx
microcontroller.pptxAdarsh College, Hingoli
14 views17 Folien
Microsoft Excell.pptx von
Microsoft Excell.pptxMicrosoft Excell.pptx
Microsoft Excell.pptxAdarsh College, Hingoli
28 views32 Folien
The 8086 microprocessor von
The  8086 microprocessorThe  8086 microprocessor
The 8086 microprocessorAdarsh College, Hingoli
83 views27 Folien
8051 Microcontroller von
8051 Microcontroller8051 Microcontroller
8051 MicrocontrollerAdarsh College, Hingoli
230 views17 Folien
Ms excel von
Ms excelMs excel
Ms excelAdarsh College, Hingoli
111 views32 Folien
DATABASE MANAGEMENT SYSTEM von
DATABASE MANAGEMENT SYSTEMDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMAdarsh College, Hingoli
44 views17 Folien

Último

What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue von
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueShapeBlue
263 views23 Folien
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... von
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...ShapeBlue
159 views25 Folien
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue von
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueShapeBlue
203 views54 Folien
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ von
Confidence in CloudStack - Aron Wagner, Nathan Gleason - AmericConfidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
Confidence in CloudStack - Aron Wagner, Nathan Gleason - AmericShapeBlue
130 views9 Folien
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... von
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...ShapeBlue
186 views15 Folien
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates von
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesKeynote Talk: Open Source is Not Dead - Charles Schulz - Vates
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesShapeBlue
252 views15 Folien

Último(20)

What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue von ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue263 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... von ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue159 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue von ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue203 views
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ von ShapeBlue
Confidence in CloudStack - Aron Wagner, Nathan Gleason - AmericConfidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
ShapeBlue130 views
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... von ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue186 views
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates von ShapeBlue
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesKeynote Talk: Open Source is Not Dead - Charles Schulz - Vates
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates
ShapeBlue252 views
Business Analyst Series 2023 - Week 4 Session 8 von DianaGray10
Business Analyst Series 2023 -  Week 4 Session 8Business Analyst Series 2023 -  Week 4 Session 8
Business Analyst Series 2023 - Week 4 Session 8
DianaGray10123 views
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... von ShapeBlue
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
ShapeBlue173 views
Future of AR - Facebook Presentation von Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty64 views
Business Analyst Series 2023 - Week 4 Session 7 von DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10139 views
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And... von ShapeBlue
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
ShapeBlue106 views
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... von ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue198 views
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... von ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue166 views
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ... von ShapeBlue
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
ShapeBlue184 views
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool von ShapeBlue
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool
ShapeBlue123 views
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T von ShapeBlue
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TCloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
ShapeBlue152 views
Initiating and Advancing Your Strategic GIS Governance Strategy von Safe Software
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
Safe Software176 views
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue von ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue222 views

class and object in c++.pptx

  • 1. Prof. R. S. Devhade Assistant Professor, Department of Electronics Adarsh College, Hingoli
  • 2. Class • A Class is a user-defined data type where we can bind data and its related functions together. It allows the data and function to be hidden from external use or outside the class. • When defining a class, we are creating a new abstract data type that can be treated like any other built in data type. • Class is a group of objects that share common properties and relationships . • In C++, a class is a new data type that contains member variables and member functions that operates on the variables. • A class is defined with the keyword class.
  • 3. Syntax: • The members that have been declared as private can be accessed only from with in the class. • On the other hand , public members can be accessed from outside the class also. • The data hiding is the key feature of oops. • The use of keywords private is optional by default, the members of a class are private. • The variables declared inside the class are known as data members and the functions are known as members mid the functions. • Only the member functions can have access to the private data members and private functions. However, the public members can be accessed from the outside the class. • The binding of data and functions together into a single class type variable is referred to as encapsulation.
  • 5. Object An object is an instance of a class. I simple words, we can say that an object is a variable of type class. The general syntax to create an object is: classname object_name; Once the object is created, it can be used to access the data members and functions of that class. Accessing the members of the class (data and functions) is done using the dot (.) operator, which is also called as the member access operator.