SlideShare a Scribd company logo
C++ basic intro on c++ programming language ppt
C++ basic intro on c++ programming language ppt
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
C++ basic intro on c++ programming language ppt
Data
Color : Black
Year : 2008
Actions
Start
Stop
Accelerate
OBJEC
T
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
Encapsulation
Data Abstraction
Inheritance
Polymorphism
Class
Grouping of data and methods 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 methods 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.
Syntax:
class class_name
Eg:
class fruit
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 or
functions
Data or
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++
 Smalltalk
 Eiffel
 CLOS
 Java
Author of C++ is
Bjarne stroustrup
He invented this language in 1980's at
AT&T Bell Laboratories
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 Object Oriented Programming
Language
Headerfile : #include<stdio.h> #include<iostream.h>
“n” is used to go to the next line we can use endl statement
Function prototypes are optional All Functions must be protyped
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
Bydefault structure members are
public
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. Who developed C++?
Encapsulation is the process of combining member functions
and the data it manipulates and keeps them safe from outside
interferrence
The three access specifiers in a class are
private,public,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
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++ basic intro on c++ programming language ppt (20)

object oriented programming language in c++
object oriented programming language in c++object oriented programming language in c++
object oriented programming language in c++
Ravikant517175
 
Object oriented programing
Object oriented programingObject oriented programing
Object oriented programing
Jamaluddin Malakzai
 
Rajib Ali Presentation on object oreitation oop.pptx
Rajib Ali Presentation on object oreitation oop.pptxRajib Ali Presentation on object oreitation oop.pptx
Rajib Ali Presentation on object oreitation oop.pptx
domefe4146
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
IndraKhatri
 
@vtucode.in-module-1-c++-2022-scheme.pdf
@vtucode.in-module-1-c++-2022-scheme.pdf@vtucode.in-module-1-c++-2022-scheme.pdf
@vtucode.in-module-1-c++-2022-scheme.pdf
TheertheshTheertha1
 
C++
C++C++
C++
Rome468
 
CPP_,module2_1.pptx
CPP_,module2_1.pptxCPP_,module2_1.pptx
CPP_,module2_1.pptx
AbhilashTom4
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
sana younas
 
c++.pptxwjwjsijsnsksomammaoansnksooskskk
c++.pptxwjwjsijsnsksomammaoansnksooskskkc++.pptxwjwjsijsnsksomammaoansnksooskskk
c++.pptxwjwjsijsnsksomammaoansnksooskskk
mitivete
 
C++ programming introduction
C++ programming introductionC++ programming introduction
C++ programming introduction
sandeep54552
 
CPP-Unit 1.pptx
CPP-Unit 1.pptxCPP-Unit 1.pptx
CPP-Unit 1.pptx
YashKoli22
 
c++ Unit I.pptx
c++ Unit I.pptxc++ Unit I.pptx
c++ Unit I.pptx
Kongunadu College of Engineering and Technology
 
C++ & Data Structure - Unit - first.pptx
C++ & Data Structure - Unit - first.pptxC++ & Data Structure - Unit - first.pptx
C++ & Data Structure - Unit - first.pptx
KONGUNADU COLLEGE OF ENGINEERING AND TECHNOLOGY
 
C++ chapter 1
C++ chapter 1C++ chapter 1
C++ chapter 1
jasvinder162
 
Object Oriented Programming beigneers Lecture 01 (1).pptx
Object Oriented Programming  beigneers Lecture 01 (1).pptxObject Oriented Programming  beigneers Lecture 01 (1).pptx
Object Oriented Programming beigneers Lecture 01 (1).pptx
namrabsit
 
Object Oriented Programming Lecture 01.pptx
Object Oriented Programming Lecture 01.pptxObject Oriented Programming Lecture 01.pptx
Object Oriented Programming Lecture 01.pptx
arjunkmyndai
 
Oops
OopsOops
Oops
PRABHAHARAN429
 
Object oriented concepts
Object oriented conceptsObject oriented concepts
Object oriented concepts
Pranali Chaudhari
 
CS305PC_C++_UNIT 1 notes jntuh third semester
CS305PC_C++_UNIT 1 notes jntuh third semesterCS305PC_C++_UNIT 1 notes jntuh third semester
CS305PC_C++_UNIT 1 notes jntuh third semester
VeeraswamyDasari2
 
oop.pptx
oop.pptxoop.pptx
oop.pptx
KabitaParajuli3
 
object oriented programming language in c++
object oriented programming language in c++object oriented programming language in c++
object oriented programming language in c++
Ravikant517175
 
Rajib Ali Presentation on object oreitation oop.pptx
Rajib Ali Presentation on object oreitation oop.pptxRajib Ali Presentation on object oreitation oop.pptx
Rajib Ali Presentation on object oreitation oop.pptx
domefe4146
 
@vtucode.in-module-1-c++-2022-scheme.pdf
@vtucode.in-module-1-c++-2022-scheme.pdf@vtucode.in-module-1-c++-2022-scheme.pdf
@vtucode.in-module-1-c++-2022-scheme.pdf
TheertheshTheertha1
 
CPP_,module2_1.pptx
CPP_,module2_1.pptxCPP_,module2_1.pptx
CPP_,module2_1.pptx
AbhilashTom4
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
sana younas
 
c++.pptxwjwjsijsnsksomammaoansnksooskskk
c++.pptxwjwjsijsnsksomammaoansnksooskskkc++.pptxwjwjsijsnsksomammaoansnksooskskk
c++.pptxwjwjsijsnsksomammaoansnksooskskk
mitivete
 
C++ programming introduction
C++ programming introductionC++ programming introduction
C++ programming introduction
sandeep54552
 
CPP-Unit 1.pptx
CPP-Unit 1.pptxCPP-Unit 1.pptx
CPP-Unit 1.pptx
YashKoli22
 
Object Oriented Programming beigneers Lecture 01 (1).pptx
Object Oriented Programming  beigneers Lecture 01 (1).pptxObject Oriented Programming  beigneers Lecture 01 (1).pptx
Object Oriented Programming beigneers Lecture 01 (1).pptx
namrabsit
 
Object Oriented Programming Lecture 01.pptx
Object Oriented Programming Lecture 01.pptxObject Oriented Programming Lecture 01.pptx
Object Oriented Programming Lecture 01.pptx
arjunkmyndai
 
CS305PC_C++_UNIT 1 notes jntuh third semester
CS305PC_C++_UNIT 1 notes jntuh third semesterCS305PC_C++_UNIT 1 notes jntuh third semester
CS305PC_C++_UNIT 1 notes jntuh third semester
VeeraswamyDasari2
 

Recently uploaded (20)

Présentation_gestion[1] [Autosaved].pptx
Présentation_gestion[1] [Autosaved].pptxPrésentation_gestion[1] [Autosaved].pptx
Présentation_gestion[1] [Autosaved].pptx
KHADIJAESSAKET
 
WIRELESS COMMUNICATION SECURITY AND IT’S PROTECTION METHODS
WIRELESS COMMUNICATION SECURITY AND IT’S PROTECTION METHODSWIRELESS COMMUNICATION SECURITY AND IT’S PROTECTION METHODS
WIRELESS COMMUNICATION SECURITY AND IT’S PROTECTION METHODS
samueljackson3773
 
chemistry investigatory project for class 12
chemistry investigatory project for class 12chemistry investigatory project for class 12
chemistry investigatory project for class 12
Susis10
 
Montreal Dreamin' 25 - Introduction to the MuleSoft AI Chain (MAC) Project
Montreal Dreamin' 25 - Introduction to the MuleSoft AI Chain (MAC) ProjectMontreal Dreamin' 25 - Introduction to the MuleSoft AI Chain (MAC) Project
Montreal Dreamin' 25 - Introduction to the MuleSoft AI Chain (MAC) Project
Alexandra N. Martinez
 
11th International Conference on Data Mining (DaMi 2025)
11th International Conference on Data Mining (DaMi 2025)11th International Conference on Data Mining (DaMi 2025)
11th International Conference on Data Mining (DaMi 2025)
kjim477n
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
djiceramil
 
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghjfHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
yadavshivank2006
 
How Binning Affects LED Performance & Consistency.pdf
How Binning Affects LED Performance & Consistency.pdfHow Binning Affects LED Performance & Consistency.pdf
How Binning Affects LED Performance & Consistency.pdf
Mina Anis
 
Universal Human Values and professional ethics Quantum AKTU BVE401
Universal Human Values and professional ethics Quantum AKTU BVE401Universal Human Values and professional ethics Quantum AKTU BVE401
Universal Human Values and professional ethics Quantum AKTU BVE401
Unknown
 
Tree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbb
Tree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbbTree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbb
Tree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbb
RATNANITINPATIL
 
Pavement and its types, Application of rigid and Flexible Pavements
Pavement and its types, Application of rigid and Flexible PavementsPavement and its types, Application of rigid and Flexible Pavements
Pavement and its types, Application of rigid and Flexible Pavements
Sakthivel M
 
First Review PPT gfinal gyft ftu liu yrfut go
First Review PPT gfinal gyft  ftu liu yrfut goFirst Review PPT gfinal gyft  ftu liu yrfut go
First Review PPT gfinal gyft ftu liu yrfut go
Sowndarya6
 
New Microsoft Office Word Documentfrf.docx
New Microsoft Office Word Documentfrf.docxNew Microsoft Office Word Documentfrf.docx
New Microsoft Office Word Documentfrf.docx
misheetasah
 
operationg systemsdocumentmemorymanagement
operationg systemsdocumentmemorymanagementoperationg systemsdocumentmemorymanagement
operationg systemsdocumentmemorymanagement
SNIGDHAAPPANABHOTLA
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
djiceramil
 
ACEP Magazine Fifth Edition on 5june2025
ACEP Magazine Fifth Edition on 5june2025ACEP Magazine Fifth Edition on 5june2025
ACEP Magazine Fifth Edition on 5june2025
Rahul
 
Impurities of Water and their Significance.pptx
Impurities of Water and their Significance.pptxImpurities of Water and their Significance.pptx
Impurities of Water and their Significance.pptx
dhanashree78
 
Structural Design for Residential-to-Restaurant Conversion
Structural Design for Residential-to-Restaurant ConversionStructural Design for Residential-to-Restaurant Conversion
Structural Design for Residential-to-Restaurant Conversion
DanielRoman285499
 
SEW make Brake BE05 – BE30 Brake – Repair Kit
SEW make Brake BE05 – BE30 Brake – Repair KitSEW make Brake BE05 – BE30 Brake – Repair Kit
SEW make Brake BE05 – BE30 Brake – Repair Kit
projectultramechanix
 
A Comprehensive Investigation into the Accuracy of Soft Computing Tools for D...
A Comprehensive Investigation into the Accuracy of Soft Computing Tools for D...A Comprehensive Investigation into the Accuracy of Soft Computing Tools for D...
A Comprehensive Investigation into the Accuracy of Soft Computing Tools for D...
Journal of Soft Computing in Civil Engineering
 
Présentation_gestion[1] [Autosaved].pptx
Présentation_gestion[1] [Autosaved].pptxPrésentation_gestion[1] [Autosaved].pptx
Présentation_gestion[1] [Autosaved].pptx
KHADIJAESSAKET
 
WIRELESS COMMUNICATION SECURITY AND IT’S PROTECTION METHODS
WIRELESS COMMUNICATION SECURITY AND IT’S PROTECTION METHODSWIRELESS COMMUNICATION SECURITY AND IT’S PROTECTION METHODS
WIRELESS COMMUNICATION SECURITY AND IT’S PROTECTION METHODS
samueljackson3773
 
chemistry investigatory project for class 12
chemistry investigatory project for class 12chemistry investigatory project for class 12
chemistry investigatory project for class 12
Susis10
 
Montreal Dreamin' 25 - Introduction to the MuleSoft AI Chain (MAC) Project
Montreal Dreamin' 25 - Introduction to the MuleSoft AI Chain (MAC) ProjectMontreal Dreamin' 25 - Introduction to the MuleSoft AI Chain (MAC) Project
Montreal Dreamin' 25 - Introduction to the MuleSoft AI Chain (MAC) Project
Alexandra N. Martinez
 
11th International Conference on Data Mining (DaMi 2025)
11th International Conference on Data Mining (DaMi 2025)11th International Conference on Data Mining (DaMi 2025)
11th International Conference on Data Mining (DaMi 2025)
kjim477n
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
djiceramil
 
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghjfHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
yadavshivank2006
 
How Binning Affects LED Performance & Consistency.pdf
How Binning Affects LED Performance & Consistency.pdfHow Binning Affects LED Performance & Consistency.pdf
How Binning Affects LED Performance & Consistency.pdf
Mina Anis
 
Universal Human Values and professional ethics Quantum AKTU BVE401
Universal Human Values and professional ethics Quantum AKTU BVE401Universal Human Values and professional ethics Quantum AKTU BVE401
Universal Human Values and professional ethics Quantum AKTU BVE401
Unknown
 
Tree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbb
Tree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbbTree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbb
Tree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbb
RATNANITINPATIL
 
Pavement and its types, Application of rigid and Flexible Pavements
Pavement and its types, Application of rigid and Flexible PavementsPavement and its types, Application of rigid and Flexible Pavements
Pavement and its types, Application of rigid and Flexible Pavements
Sakthivel M
 
First Review PPT gfinal gyft ftu liu yrfut go
First Review PPT gfinal gyft  ftu liu yrfut goFirst Review PPT gfinal gyft  ftu liu yrfut go
First Review PPT gfinal gyft ftu liu yrfut go
Sowndarya6
 
New Microsoft Office Word Documentfrf.docx
New Microsoft Office Word Documentfrf.docxNew Microsoft Office Word Documentfrf.docx
New Microsoft Office Word Documentfrf.docx
misheetasah
 
operationg systemsdocumentmemorymanagement
operationg systemsdocumentmemorymanagementoperationg systemsdocumentmemorymanagement
operationg systemsdocumentmemorymanagement
SNIGDHAAPPANABHOTLA
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
djiceramil
 
ACEP Magazine Fifth Edition on 5june2025
ACEP Magazine Fifth Edition on 5june2025ACEP Magazine Fifth Edition on 5june2025
ACEP Magazine Fifth Edition on 5june2025
Rahul
 
Impurities of Water and their Significance.pptx
Impurities of Water and their Significance.pptxImpurities of Water and their Significance.pptx
Impurities of Water and their Significance.pptx
dhanashree78
 
Structural Design for Residential-to-Restaurant Conversion
Structural Design for Residential-to-Restaurant ConversionStructural Design for Residential-to-Restaurant Conversion
Structural Design for Residential-to-Restaurant Conversion
DanielRoman285499
 
SEW make Brake BE05 – BE30 Brake – Repair Kit
SEW make Brake BE05 – BE30 Brake – Repair KitSEW make Brake BE05 – BE30 Brake – Repair Kit
SEW make Brake BE05 – BE30 Brake – Repair Kit
projectultramechanix
 
Ad

C++ basic intro on c++ programming language ppt

  • 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
  • 6. Data Color : Black Year : 2008 Actions Start Stop Accelerate OBJEC T
  • 7. 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
  • 14. Grouping of data and methods 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 methods 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. Syntax: class class_name Eg: class fruit
  • 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 or functions Data or 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++  Smalltalk  Eiffel  CLOS  Java
  • 30. Author of C++ is Bjarne stroustrup He invented this language in 1980's at AT&T Bell Laboratories 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 Object Oriented Programming Language Headerfile : #include #include “n” is used to go to the next line we can use endl statement Function prototypes are optional All Functions must be protyped 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 Bydefault structure members are public 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. Who developed C++? Encapsulation is the process of combining member functions and the data it manipulates and keeps them safe from outside interferrence The three access specifiers in a class are private,public,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
  • 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?