SlideShare a Scribd company logo
1 of 35
Session Objectives
Define Class & Objects
Characteristics of OOPS
History of C++
Difference Between C & C++
C++ Programming Structure
Introduction to Objects
All around us in the
real world are
objects.
Each object has
certain
characteristics and
exhibits certain
behaviour
Data
Color : Black
Year : 2008
Actions
Start
Stop
Accelerate
OBJEC
T
1. The Object-Oriented Approach
- III
Personnel
Accounts Sales
The real world around is full of objects .We can consider both living
beings as well as things as objects.For example,the different
departments in a company are objects.
Why OOP’s Concept are Used?
The drawbacks of Traditional Programming
approach are
Unmanageable Programs
Code Reusability not Optimum
Problems in Modification of Data
Difficulty in Implementation
Object – Oriented Programming
Accounts
Data
Employee details
Salary statements
Bills
Vouchers
Reciepts
Functions
Calculate salary
Pay salary
Pay bills
Tally accounts
Transact with banks
Here the application has to implement the entities as they are
seen in real life and associate actions and attributes with each.
Benefits of Object Oriented Programming approach
are -
 OOP offers better implementation
 OOP offers better data security
 OOP offers better code reusability
 OOP offers more flexibility
 OOP offers better manageable programs
 Large complexity in the software development
can be easily managed
 User defined datatypes can be easily constructed
Object Oriented Approach
Problem
Identification Analysis
Design
Development
Testing
Implementation
Maintenance
 Data acquisition Systems
 Client/Server Computing
 Object –Oriented Database applications
 Artificial Intelligence and expert systems
 systems such as process control, temperature control etc.
 GUI based system such as Windows Applications
 Computer Aided Design and manufacturing Systems
1. Class : collection of data members & member
functions (methods)
2. Object : instance of a class
3. Encapsulation : binding code & data
4. Data Abstraction : securing data
5. Inheritance: creating new class from existing class
6. Polymorphism : ability to take more than one form
many form
Grouping of data and functions into a
single entity is known as Data
Encapsulation
It is a technical name for
information hiding. (i.e data hiding or
data security)
Encapsulation
Not accessible from
outside class
Accessible from outside
class
Private
Public
Class
Data abstraction enhances security as use
of data is restricted to certain functions
only.
Abstraction is more used where you
want only a certain number of
functions/methods are accessing data.
Attributes
Methods
Class
For Example
Data abstraction is a process of
identifying properties and
methods related much to a
particular entity as relevant to the
application
It is the process of
creating a new class from
an existing class
Insects Mammals Reptiles Amphibians
Humans Non-Humans
Animals
Reusability can be achieved through inheritance
Reusability
Programs can be
broken into reusable
objects
Existing classes can be
used with additional
features
Shape
Benefits of Inheritance
• polymorphism allows a programmer to
purse a course of action by sending a
message to an object without concerning
about how the software system is to
implement the action
Simply defined as “Same thing
can behave different ones”
Class -
Artiste
Dancer Poet
Sculptor
Class : Shape
Methods :
Draw
Move
Initialize
Subclasses
A class is what defines all the data
members and the functions that an object
should have.
The class defines the characteristics that
the object will possess; it could also be
referred to as a blueprint of the object.
For Example
Polygon
objects
Polygon class
Properties
Vertices
Border Color
Fill Color
Methods
Draw
Erase
Move
Abstract
into
Simply defined as a structure that combines the
objects with some attributes (data structure)
and some behavior (operation)
+
Access Specifiers of a Class
Class
Data
functions
Private
Public
Not
accessible
from outside
the class
Accessible
from outside
the class
To access the member data
and member function defined
inside the class
Object Oriented Languages
• Some of the leading object oriented
languages are:
– C++
– Java
– C#.Net
– Python
– R
Author of C++ is
Bjarne stroustrup
He invented this language in 1980's at
AT&T Bell Laboratories
C with Class
All the C programs can be run
successfully using C++ compiler
C++ was designed using two
languages such as “C” Language
which gives the low-level feature
and “Simula67” provides the
class concept.
C Language C++ Language
Procedural Programming Language
POP
Object Oriented Programming
Language. OOP
Header file : #include<stdio.h> #include<iostream.h>
Top down approach Bottom up approach
Function prototypes are optional All Functions must be prototyped
Local variables declared only the start
of a C program
It can be declared anywhere in a
program, before they are used
Return type for a function is optional Return type must be specified
Do not permit data Hiding They permit data hiding
By default structure members are
public
By default class members are
private
We can call a main() function within a
program.
This is not allowed
Each class specification starts with the keyword “class”
The Class Specification must always end with a semicolon (;)
Data abstraction is the ability to create user-defined data
types for modeling real world objects using built-in data types.
Classes are used for data abstraction by hiding the
implementation of a type in the “private” part.
Polymorphism in Greek word means “Many Forms”
A class is an enhanced structure that provides Object-Oriented
Features of C++
An object is an instance of a class which combines both data
and functions together.
Encapsulation is the process of combining member functions
and the data it manipulates and keeps them safe from outside
interference
The three access specifiers in a class are private, public and
protected
By default all members declared inside a class are private to
that class
C++ provides two pre-defined objects cin and cout for handling
input and output
EXERCISES
1. Describe the Basic concepts of OOPS?
2. List the various applications of Object oriented
Programming?
3. Explain briefly Classes & Objects?
4. State the use of #include directive in C++?
5. List the various benefits of Object Oriented Programming?

More Related Content

Similar to C++Day-1 Introduction.ppt

C++ with student management system project
C++ with student management system projectC++ with student management system project
C++ with student management system projectKratik Khandelwal
 
1 intro
1 intro1 intro
1 introabha48
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPTAjay Chimmani
 
Object Oriented Programming Lecture Notes
Object Oriented Programming Lecture NotesObject Oriented Programming Lecture Notes
Object Oriented Programming Lecture NotesFellowBuddy.com
 
Software_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptxSoftware_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptxArifaMehreen1
 
Bca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionBca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionRai University
 
M.c.a. (sem iv)- java programming
M.c.a. (sem   iv)- java programmingM.c.a. (sem   iv)- java programming
M.c.a. (sem iv)- java programmingPraveen Chowdary
 
Ch.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsCh.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsITNet
 
Mca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroductionMca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroductionRai University
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaMadishetty Prathibha
 
Object Oriented Programming with C#
Object Oriented Programming with C#Object Oriented Programming with C#
Object Oriented Programming with C#SyedUmairAli9
 
Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++Amresh Raj
 

Similar to C++Day-1 Introduction.ppt (20)

OOP.pptx
OOP.pptxOOP.pptx
OOP.pptx
 
Topic 1 PBO
Topic 1 PBOTopic 1 PBO
Topic 1 PBO
 
JAVA PROGRAMMING
JAVA PROGRAMMING JAVA PROGRAMMING
JAVA PROGRAMMING
 
Birasa 1
Birasa 1Birasa 1
Birasa 1
 
C++ & VISUAL C++
C++ & VISUAL C++ C++ & VISUAL C++
C++ & VISUAL C++
 
C++ with student management system project
C++ with student management system projectC++ with student management system project
C++ with student management system project
 
My c++
My c++My c++
My c++
 
1 intro
1 intro1 intro
1 intro
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT
 
Object Oriented Programming Lecture Notes
Object Oriented Programming Lecture NotesObject Oriented Programming Lecture Notes
Object Oriented Programming Lecture Notes
 
Software_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptxSoftware_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptx
 
JAVA PROGRAMMINGD
JAVA PROGRAMMINGDJAVA PROGRAMMINGD
JAVA PROGRAMMINGD
 
Bca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionBca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroduction
 
M.c.a. (sem iv)- java programming
M.c.a. (sem   iv)- java programmingM.c.a. (sem   iv)- java programming
M.c.a. (sem iv)- java programming
 
Ch.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsCh.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objects
 
MCA NOTES.pdf
MCA NOTES.pdfMCA NOTES.pdf
MCA NOTES.pdf
 
Mca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroductionMca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroduction
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in Java
 
Object Oriented Programming with C#
Object Oriented Programming with C#Object Oriented Programming with C#
Object Oriented Programming with C#
 
Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++
 

Recently uploaded

定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Lucknow
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 

Recently uploaded (20)

Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 

C++Day-1 Introduction.ppt

  • 1.
  • 2.
  • 3. Session Objectives Define Class & Objects Characteristics of OOPS History of C++ Difference Between C & C++ C++ Programming Structure Introduction to Objects
  • 4. All around us in the real world are objects. Each object has certain characteristics and exhibits certain behaviour
  • 5.
  • 6. Data Color : Black Year : 2008 Actions Start Stop Accelerate OBJEC T
  • 7. 1. The Object-Oriented Approach - III Personnel Accounts Sales The real world around is full of objects .We can consider both living beings as well as things as objects.For example,the different departments in a company are objects.
  • 8. Why OOP’s Concept are Used? The drawbacks of Traditional Programming approach are Unmanageable Programs Code Reusability not Optimum Problems in Modification of Data Difficulty in Implementation
  • 9. Object – Oriented Programming Accounts Data Employee details Salary statements Bills Vouchers Reciepts Functions Calculate salary Pay salary Pay bills Tally accounts Transact with banks Here the application has to implement the entities as they are seen in real life and associate actions and attributes with each.
  • 10. Benefits of Object Oriented Programming approach are -  OOP offers better implementation  OOP offers better data security  OOP offers better code reusability  OOP offers more flexibility  OOP offers better manageable programs  Large complexity in the software development can be easily managed  User defined datatypes can be easily constructed
  • 11. Object Oriented Approach Problem Identification Analysis Design Development Testing Implementation Maintenance
  • 12.  Data acquisition Systems  Client/Server Computing  Object –Oriented Database applications  Artificial Intelligence and expert systems  systems such as process control, temperature control etc.  GUI based system such as Windows Applications  Computer Aided Design and manufacturing Systems
  • 13. 1. Class : collection of data members & member functions (methods) 2. Object : instance of a class 3. Encapsulation : binding code & data 4. Data Abstraction : securing data 5. Inheritance: creating new class from existing class 6. Polymorphism : ability to take more than one form many form
  • 14. Grouping of data and functions into a single entity is known as Data Encapsulation It is a technical name for information hiding. (i.e data hiding or data security)
  • 15. Encapsulation Not accessible from outside class Accessible from outside class Private Public Class
  • 16. Data abstraction enhances security as use of data is restricted to certain functions only. Abstraction is more used where you want only a certain number of functions/methods are accessing data.
  • 17. Attributes Methods Class For Example Data abstraction is a process of identifying properties and methods related much to a particular entity as relevant to the application
  • 18. It is the process of creating a new class from an existing class
  • 19. Insects Mammals Reptiles Amphibians Humans Non-Humans Animals Reusability can be achieved through inheritance
  • 20. Reusability Programs can be broken into reusable objects Existing classes can be used with additional features Shape
  • 22. • polymorphism allows a programmer to purse a course of action by sending a message to an object without concerning about how the software system is to implement the action Simply defined as “Same thing can behave different ones”
  • 23. Class - Artiste Dancer Poet Sculptor Class : Shape Methods : Draw Move Initialize Subclasses
  • 24. A class is what defines all the data members and the functions that an object should have. The class defines the characteristics that the object will possess; it could also be referred to as a blueprint of the object.
  • 25. For Example Polygon objects Polygon class Properties Vertices Border Color Fill Color Methods Draw Erase Move Abstract into
  • 26. Simply defined as a structure that combines the objects with some attributes (data structure) and some behavior (operation) +
  • 27. Access Specifiers of a Class Class Data functions Private Public Not accessible from outside the class Accessible from outside the class
  • 28. To access the member data and member function defined inside the class
  • 29. Object Oriented Languages • Some of the leading object oriented languages are: – C++ – Java – C#.Net – Python – R
  • 30. Author of C++ is Bjarne stroustrup He invented this language in 1980's at AT&T Bell Laboratories C with Class All the C programs can be run successfully using C++ compiler
  • 31. C++ was designed using two languages such as “C” Language which gives the low-level feature and “Simula67” provides the class concept.
  • 32. C Language C++ Language Procedural Programming Language POP Object Oriented Programming Language. OOP Header file : #include<stdio.h> #include<iostream.h> Top down approach Bottom up approach Function prototypes are optional All Functions must be prototyped Local variables declared only the start of a C program It can be declared anywhere in a program, before they are used Return type for a function is optional Return type must be specified Do not permit data Hiding They permit data hiding By default structure members are public By default class members are private We can call a main() function within a program. This is not allowed
  • 33. Each class specification starts with the keyword “class” The Class Specification must always end with a semicolon (;) Data abstraction is the ability to create user-defined data types for modeling real world objects using built-in data types. Classes are used for data abstraction by hiding the implementation of a type in the “private” part. Polymorphism in Greek word means “Many Forms”
  • 34. A class is an enhanced structure that provides Object-Oriented Features of C++ An object is an instance of a class which combines both data and functions together. Encapsulation is the process of combining member functions and the data it manipulates and keeps them safe from outside interference The three access specifiers in a class are private, public and protected By default all members declared inside a class are private to that class C++ provides two pre-defined objects cin and cout for handling input and output
  • 35. EXERCISES 1. Describe the Basic concepts of OOPS? 2. List the various applications of Object oriented Programming? 3. Explain briefly Classes & Objects? 4. State the use of #include directive in C++? 5. List the various benefits of Object Oriented Programming?