SlideShare uma empresa Scribd logo
1 de 28
C++ Classes Qazi Haseeb Yousaf BCS-IV ( Morning B) C.No 22 Presented By
In The Real World Life ,[object Object],[object Object],[object Object],[object Object],[object Object]
A Real World Object ATTRIBUTES BEHAVIORS
What is Data Abstraction? ,[object Object],[object Object],[object Object],[object Object],[object Object]
For Object-Orientation  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Encapsulation ,[object Object],[object Object]
Information Hiding ,[object Object],[object Object],[object Object]
C++ Class ,[object Object],[object Object],[object Object],[object Object]
C++ Class ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
C++ Class (Syntax) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Don’t Forget this Semi-colon
Members of A Class ,[object Object],[object Object]
A simple class ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Access Specifiers ,[object Object],[object Object],[object Object]
Access Specifiers (contd…) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Class Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
OBJECT ,[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object]
C++ Objects
Creating Objects ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creating an object (Syntax) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Accessing Class Members ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Constructor ,[object Object],[object Object],[object Object]
General Syntax of Constructor ,[object Object],[object Object],[object Object]
Default Constructor: ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Copy constructor: ,[object Object]
Example (coding) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example (output) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
That’s All THANKS!

Mais conteúdo relacionado

Mais procurados

Union in C programming
Union in C programmingUnion in C programming
Union in C programmingKamal Acharya
 
Presentation on c structures
Presentation on c   structures Presentation on c   structures
Presentation on c structures topu93
 
data types in C programming
data types in C programmingdata types in C programming
data types in C programmingHarshita Yadav
 
classes and objects in C++
classes and objects in C++classes and objects in C++
classes and objects in C++HalaiHansaika
 
C Programming: Structure and Union
C Programming: Structure and UnionC Programming: Structure and Union
C Programming: Structure and UnionSelvaraj Seerangan
 
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programmingprogramming9
 
Class and object in C++
Class and object in C++Class and object in C++
Class and object in C++rprajat007
 
Array Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional arrayArray Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional arrayimtiazalijoono
 
Constructor and Types of Constructors
Constructor and Types of ConstructorsConstructor and Types of Constructors
Constructor and Types of ConstructorsDhrumil Panchal
 
Inline function in C++
Inline function in C++Inline function in C++
Inline function in C++Learn By Watch
 
Call by value
Call by valueCall by value
Call by valueDharani G
 
Operators in c programming
Operators in c programmingOperators in c programming
Operators in c programmingsavitamhaske
 

Mais procurados (20)

Function overloading
Function overloadingFunction overloading
Function overloading
 
Union in C programming
Union in C programmingUnion in C programming
Union in C programming
 
Presentation on c structures
Presentation on c   structures Presentation on c   structures
Presentation on c structures
 
data types in C programming
data types in C programmingdata types in C programming
data types in C programming
 
classes and objects in C++
classes and objects in C++classes and objects in C++
classes and objects in C++
 
Templates
TemplatesTemplates
Templates
 
Constructor ppt
Constructor pptConstructor ppt
Constructor ppt
 
C Programming: Structure and Union
C Programming: Structure and UnionC Programming: Structure and Union
C Programming: Structure and Union
 
Arrays and Strings
Arrays and Strings Arrays and Strings
Arrays and Strings
 
Pointers in c++
Pointers in c++Pointers in c++
Pointers in c++
 
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programming
 
Functions in c
Functions in cFunctions in c
Functions in c
 
Pointer in C++
Pointer in C++Pointer in C++
Pointer in C++
 
Class and object in C++
Class and object in C++Class and object in C++
Class and object in C++
 
Array Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional arrayArray Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional array
 
Data types in C
Data types in CData types in C
Data types in C
 
Constructor and Types of Constructors
Constructor and Types of ConstructorsConstructor and Types of Constructors
Constructor and Types of Constructors
 
Inline function in C++
Inline function in C++Inline function in C++
Inline function in C++
 
Call by value
Call by valueCall by value
Call by value
 
Operators in c programming
Operators in c programmingOperators in c programming
Operators in c programming
 

Destaque

class and objects
class and objectsclass and objects
class and objectsPayel Guria
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorialsFALLEE31188
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programmingSachin Sharma
 
Classes And Objects
Classes And ObjectsClasses And Objects
Classes And Objectsrahulsahay19
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Conceptsthinkphp
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop)   cs304 power point slides lecture 01Object oriented programming (oop)   cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01Adil Kakakhel
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingMoutaz Haddara
 
Object-Oriented Programming Concepts
Object-Oriented Programming ConceptsObject-Oriented Programming Concepts
Object-Oriented Programming ConceptsKwangshin Oh
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorialsMayank Jain
 
Stream classes in C++
Stream classes in C++Stream classes in C++
Stream classes in C++Shyam Gupta
 
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...cprogrammings
 

Destaque (20)

class and objects
class and objectsclass and objects
class and objects
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorials
 
Oops ppt
Oops pptOops ppt
Oops ppt
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programming
 
Classes And Objects
Classes And ObjectsClasses And Objects
Classes And Objects
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop)   cs304 power point slides lecture 01Object oriented programming (oop)   cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
C++ classes
C++ classesC++ classes
C++ classes
 
Object-Oriented Programming Concepts
Object-Oriented Programming ConceptsObject-Oriented Programming Concepts
Object-Oriented Programming Concepts
 
C++ Pointers
C++ PointersC++ Pointers
C++ Pointers
 
Object and class
Object and classObject and class
Object and class
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorials
 
OOP
OOPOOP
OOP
 
Stream classes in C++
Stream classes in C++Stream classes in C++
Stream classes in C++
 
C++ language
C++ languageC++ language
C++ language
 
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
 
Constructors & destructors
Constructors & destructorsConstructors & destructors
Constructors & destructors
 
Inheritance
InheritanceInheritance
Inheritance
 

Semelhante a C++ classes

oop lecture 3
oop lecture 3oop lecture 3
oop lecture 3Atif Khan
 
OBJECT ORIENTED PROGRAMING IN C++
OBJECT ORIENTED PROGRAMING IN C++ OBJECT ORIENTED PROGRAMING IN C++
OBJECT ORIENTED PROGRAMING IN C++ Dev Chauhan
 
chapter-7-classes-and-objects.pdf
chapter-7-classes-and-objects.pdfchapter-7-classes-and-objects.pdf
chapter-7-classes-and-objects.pdfstudy material
 
Introduction to object oriented programming concepts
Introduction to object oriented programming conceptsIntroduction to object oriented programming concepts
Introduction to object oriented programming conceptsGanesh Karthik
 
object oriented programming using java, second sem BCA,UoM
object oriented programming using java, second sem BCA,UoMobject oriented programming using java, second sem BCA,UoM
object oriented programming using java, second sem BCA,UoMambikavenkatesh2
 
Classes, objects and methods
Classes, objects and methodsClasses, objects and methods
Classes, objects and methodsfarhan amjad
 
Object and class presentation
Object and class presentationObject and class presentation
Object and class presentationnafisa rahman
 
classandobjectunit2-150824133722-lva1-app6891.ppt
classandobjectunit2-150824133722-lva1-app6891.pptclassandobjectunit2-150824133722-lva1-app6891.ppt
classandobjectunit2-150824133722-lva1-app6891.pptmanomkpsg
 
C++ largest no between three nos
C++ largest no between three nosC++ largest no between three nos
C++ largest no between three noskrismishra
 

Semelhante a C++ classes (20)

Class and object
Class and objectClass and object
Class and object
 
Lecture 2 (1)
Lecture 2 (1)Lecture 2 (1)
Lecture 2 (1)
 
oop lecture 3
oop lecture 3oop lecture 3
oop lecture 3
 
C++ Notes
C++ NotesC++ Notes
C++ Notes
 
OBJECT ORIENTED PROGRAMING IN C++
OBJECT ORIENTED PROGRAMING IN C++ OBJECT ORIENTED PROGRAMING IN C++
OBJECT ORIENTED PROGRAMING IN C++
 
Lecture 4. mte 407
Lecture 4. mte 407Lecture 4. mte 407
Lecture 4. mte 407
 
My c++
My c++My c++
My c++
 
Opp concept in c++
Opp concept in c++Opp concept in c++
Opp concept in c++
 
chapter-7-classes-and-objects.pdf
chapter-7-classes-and-objects.pdfchapter-7-classes-and-objects.pdf
chapter-7-classes-and-objects.pdf
 
Introduction to object oriented programming concepts
Introduction to object oriented programming conceptsIntroduction to object oriented programming concepts
Introduction to object oriented programming concepts
 
object oriented programming using java, second sem BCA,UoM
object oriented programming using java, second sem BCA,UoMobject oriented programming using java, second sem BCA,UoM
object oriented programming using java, second sem BCA,UoM
 
Classes, objects and methods
Classes, objects and methodsClasses, objects and methods
Classes, objects and methods
 
OOPs & C++ UNIT 3
OOPs & C++ UNIT 3OOPs & C++ UNIT 3
OOPs & C++ UNIT 3
 
Object and class presentation
Object and class presentationObject and class presentation
Object and class presentation
 
classandobjectunit2-150824133722-lva1-app6891.ppt
classandobjectunit2-150824133722-lva1-app6891.pptclassandobjectunit2-150824133722-lva1-app6891.ppt
classandobjectunit2-150824133722-lva1-app6891.ppt
 
C++ largest no between three nos
C++ largest no between three nosC++ largest no between three nos
C++ largest no between three nos
 
class c++
class c++class c++
class c++
 
Php oop (1)
Php oop (1)Php oop (1)
Php oop (1)
 
oopm 2.pdf
oopm 2.pdfoopm 2.pdf
oopm 2.pdf
 
Lecture 9
Lecture 9Lecture 9
Lecture 9
 

C++ classes