SlideShare a Scribd company logo
1 of 27
INTRODUCTION TO
OBJECT - ORIENTED
PROGRAMMING
PREPARED BY
Patel Shruti J.
BE- 4th sem
Programming Languages
• Programming languages allow programmers to code
software.
• The three major families of languages are:
– Machine languages
– Assembly languages
– High-Level languages
Machine Languages
• Comprised of 1s and 0s
• The “native” language of a computer
• Difficult to program – one misplaced 1 or 0 will cause
the program to fail.
• Example of code:
1110100010101 111010101110
10111010110100 10100011110111
Assembly Languages
• Assembly languages are a step towards easier
programming.
• Each assembly language is specific to a particular
computer architecture.
• Assembly language code needs to be translated to
machine language before the computer processes it.
• They are translated by an assembler into machine
language.
• Assembly language uses mnemonic to represent
each low level machine instruction or opcode, also
each architectural register,flag.
High-Level Languages
• High-level languages represent a giant leap towards
easier programming.
• The syntax of HL languages is similar to English.
• It is converted into machine level language by
compiler.
• Historically, we divide HL languages into two groups:
– Procedure oriented programming
– Object-Oriented programming (OOP)
Procedure oriented programming
• Early high-level languages are typically called
procedural languages.
• Procedural languages are characterized by sequential
sets of linear commands. The focus of such
languages is on structure.
• Examples include C, COBOL, Fortran, LISP, Perl,
HTML, VBScript
Procedure oriented programming
• Structure of POP :
Procedure oriented programming
• Features :
 Emphasis is on procedure of doing things.
 Larger programs are divided into smaller programs
called functions.
 Data can move openly around the system from
function to function.
 Adding of data and function is difficult.
 Top down approach in program design.
Object-Oriented Programming
Definition of OOP:
• Object oriented programming is a programming
methodology that associates data structures with a
set of operators which act upon it.
Object-Oriented Programming
• Most object-oriented languages are high-level
languages.
• The focus of OOP languages is not on structure, but
on modeling data.
• Programmers code using “blueprints” of data models
called classes.
• Examples of OOP languages include C++, Visual
Basic.NET and Java.
Object-Oriented Programming
• Structure of OOP :
Object-Oriented Programming
• Features :
 Emphasis is on data.
 Programs are divided into objects and classes.
 Data is hidden and cannot be accessed by the
external function.
 New data and functions can be added when
necessary.
 Bottom up approach in program design.
Elements of OOP
• Objects
• Classes
• Encapsulation
• Data Abstraction
• Inheritance
• Polymorphism
• Message Passing
Objects
• OOP uses objects as its fundamental building blocks.
• Objects are the basic run-time entities in an object-
oriented system.
• Every object is associated with data and functions
which define meaningful operations on that object.
• Object is a real world existing entity.
• Object is an Instance of a particular class.
Objects
DATAFUNCTIONS FUNCTIONS
Example: Student Object
St_name
St_id
Branch
Performance Result
Class
• Class is a collection of similar objects.
• Mango, Apple etc. are objects and their class is Fruit.
Encapsulation
• Wrapping up of data and functions into a single unit
(class) is called encapsulation.
• Data is not accessible to outside world.
• Only those functions which are which are wrapped in
the class can access it.
Data Abstraction
• A data abstraction is a simplified view of an object
that includes only features one is interested in while
hides away the unnecessary details.
• Data abstraction becomes an abstract data type
(ADT)or a user-defined type.
Inheritance
• Inheritance is the mechanism to provides the power
of reusability and extendibility.
• Inheritance is the process by which one object can
acquire the properties of another
object.
• Types :
 Single
 Multilevel
 Multiple
 Hybrid
 Hierarchical
Inheritance
Polymorphism
• Poly means many. Morphism means forms.
• Polymorphism means that the same thing can exist
in two forms.
• Polymorphism is in short the ability to call different
functions by just using one type of function call.
• Ex : Bank can be used as - bank (river)
- bank (finance)
Message Passing
• Information or message of one object can be sent to
other object.
• Object communicate with one another by sending
and receiving information much the same way as
people communicate with each other.
• A message for an object is a request for execution of
a proedure and it will invoke a procedure in receiving
object that generates the desired result.
Message Passing
• Message passing involves specifying the name of the
object, the name of the function and the information
to be sent.
• Ex- employee.salary(name);
Object
Message
Information
Benefits of OOP
• Through inheritance we can extend the use of
existing classes.
• Build secure program by data hiding.
• Message passing techniques for communication
between objects make is much simplier.
• It is easy to partition the work in a project based on
object.
Applications of OOP
• Database management systems
• Data security
• Artificial intelligence and expert systems
• Mobile computing
• Real time systems
• Simulation and modeling
• Distributed computing
Introduction to oop with c++

More Related Content

What's hot

What's hot (20)

itft-Decision making and branching in java
itft-Decision making and branching in javaitft-Decision making and branching in java
itft-Decision making and branching in java
 
Mca se chapter_9_formal_methods
Mca se chapter_9_formal_methodsMca se chapter_9_formal_methods
Mca se chapter_9_formal_methods
 
Error Detection & Recovery
Error Detection & RecoveryError Detection & Recovery
Error Detection & Recovery
 
Python Debugging Fundamentals
Python Debugging FundamentalsPython Debugging Fundamentals
Python Debugging Fundamentals
 
9. Input Output in java
9. Input Output in java9. Input Output in java
9. Input Output in java
 
Python GUI
Python GUIPython GUI
Python GUI
 
Swing and AWT in java
Swing and AWT in javaSwing and AWT in java
Swing and AWT in java
 
White box testing
White box testingWhite box testing
White box testing
 
Polymorphism presentation in java
Polymorphism presentation in javaPolymorphism presentation in java
Polymorphism presentation in java
 
Java program structure
Java program structureJava program structure
Java program structure
 
Conditional statement c++
Conditional statement c++Conditional statement c++
Conditional statement c++
 
Data Types, Variables, and Operators
Data Types, Variables, and OperatorsData Types, Variables, and Operators
Data Types, Variables, and Operators
 
Java awt (abstract window toolkit)
Java awt (abstract window toolkit)Java awt (abstract window toolkit)
Java awt (abstract window toolkit)
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Lecture 04 syntax analysis
Lecture 04 syntax analysisLecture 04 syntax analysis
Lecture 04 syntax analysis
 
Moore and mealy machines
Moore and mealy machinesMoore and mealy machines
Moore and mealy machines
 
Type casting in java
Type casting in javaType casting in java
Type casting in java
 
PHP - Introduction to File Handling with PHP
PHP -  Introduction to  File Handling with PHPPHP -  Introduction to  File Handling with PHP
PHP - Introduction to File Handling with PHP
 
Lesson 3
Lesson 3Lesson 3
Lesson 3
 
structured programming
structured programmingstructured programming
structured programming
 

Similar to Introduction to oop with c++

Python-unit -I.pptx
Python-unit -I.pptxPython-unit -I.pptx
Python-unit -I.pptx
crAmth
 
C-and-Cpp-Brochure-English. .
C-and-Cpp-Brochure-English.               .C-and-Cpp-Brochure-English.               .
C-and-Cpp-Brochure-English. .
spotguys705
 
1 unit (oops)
1 unit (oops)1 unit (oops)
1 unit (oops)
Jay Patel
 
1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf
SahajShrimal1
 

Similar to Introduction to oop with c++ (20)

C++ chapter 1
C++ chapter 1C++ chapter 1
C++ chapter 1
 
SE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPTSE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPT
 
Oop.pptx
Oop.pptxOop.pptx
Oop.pptx
 
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
 
Python-unit -I.pptx
Python-unit -I.pptxPython-unit -I.pptx
Python-unit -I.pptx
 
C-and-Cpp-Brochure-English. .
C-and-Cpp-Brochure-English.               .C-and-Cpp-Brochure-English.               .
C-and-Cpp-Brochure-English. .
 
Presentation c
Presentation cPresentation c
Presentation c
 
C++ in object oriented programming
C++ in object oriented programmingC++ in object oriented programming
C++ in object oriented programming
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Julia Computing - an alternative to Hadoop
Julia Computing - an alternative to HadoopJulia Computing - an alternative to Hadoop
Julia Computing - an alternative to Hadoop
 
Unit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptxUnit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptx
 
OOP-1.pptx
OOP-1.pptxOOP-1.pptx
OOP-1.pptx
 
The Big Picture
The Big PictureThe Big Picture
The Big Picture
 
Principles of OOPs.pptx
Principles of OOPs.pptxPrinciples of OOPs.pptx
Principles of OOPs.pptx
 
1 unit (oops)
1 unit (oops)1 unit (oops)
1 unit (oops)
 
Presentation-1.pptx
Presentation-1.pptxPresentation-1.pptx
Presentation-1.pptx
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
 
1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf
 
High Level Languages (Imperative, Object Orientated, Declarative)
High Level Languages (Imperative, Object Orientated, Declarative)High Level Languages (Imperative, Object Orientated, Declarative)
High Level Languages (Imperative, Object Orientated, Declarative)
 

Recently uploaded

Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdfreStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
Ken Fuller
 
Chikkabanavara Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Chikkabanavara Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...Chikkabanavara Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Chikkabanavara Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
amitlee9823
 
Call Girls In Mahadevapura ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Mahadevapura ☎ 7737669865 🥵 Book Your One night StandCall Girls In Mahadevapura ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Mahadevapura ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
➥🔝 7737669865 🔝▻ Tirupati Call-girls in Women Seeking Men 🔝Tirupati🔝 Escor...
➥🔝 7737669865 🔝▻ Tirupati Call-girls in Women Seeking Men  🔝Tirupati🔝   Escor...➥🔝 7737669865 🔝▻ Tirupati Call-girls in Women Seeking Men  🔝Tirupati🔝   Escor...
➥🔝 7737669865 🔝▻ Tirupati Call-girls in Women Seeking Men 🔝Tirupati🔝 Escor...
amitlee9823
 
Call Girls Jayanagar Just Call 👗 9155563397 👗 Top Class Call Girl Service Ban...
Call Girls Jayanagar Just Call 👗 9155563397 👗 Top Class Call Girl Service Ban...Call Girls Jayanagar Just Call 👗 9155563397 👗 Top Class Call Girl Service Ban...
Call Girls Jayanagar Just Call 👗 9155563397 👗 Top Class Call Girl Service Ban...
only4webmaster01
 
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
amitlee9823
 
Chintamani Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ba...
Chintamani Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ba...Chintamani Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ba...
Chintamani Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ba...
amitlee9823
 
Call Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
amitlee9823
 
Call Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...
Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...
Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...
gajnagarg
 
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...
Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...
Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...
ZurliaSoop
 
Just Call Vip call girls fazilka Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls fazilka Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls fazilka Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls fazilka Escorts ☎️9352988975 Two shot with one girl ...
gajnagarg
 
➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men 🔝Nandyal🔝 Escorts...
➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men  🔝Nandyal🔝   Escorts...➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men  🔝Nandyal🔝   Escorts...
➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men 🔝Nandyal🔝 Escorts...
amitlee9823
 
Call Girls In Sarjapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Sarjapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Sarjapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Sarjapur Road ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 

Recently uploaded (20)

Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdfreStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
 
Chikkabanavara Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Chikkabanavara Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...Chikkabanavara Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Chikkabanavara Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
 
Call Girls In Mahadevapura ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Mahadevapura ☎ 7737669865 🥵 Book Your One night StandCall Girls In Mahadevapura ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Mahadevapura ☎ 7737669865 🥵 Book Your One night Stand
 
➥🔝 7737669865 🔝▻ Tirupati Call-girls in Women Seeking Men 🔝Tirupati🔝 Escor...
➥🔝 7737669865 🔝▻ Tirupati Call-girls in Women Seeking Men  🔝Tirupati🔝   Escor...➥🔝 7737669865 🔝▻ Tirupati Call-girls in Women Seeking Men  🔝Tirupati🔝   Escor...
➥🔝 7737669865 🔝▻ Tirupati Call-girls in Women Seeking Men 🔝Tirupati🔝 Escor...
 
Call Girls Jayanagar Just Call 👗 9155563397 👗 Top Class Call Girl Service Ban...
Call Girls Jayanagar Just Call 👗 9155563397 👗 Top Class Call Girl Service Ban...Call Girls Jayanagar Just Call 👗 9155563397 👗 Top Class Call Girl Service Ban...
Call Girls Jayanagar Just Call 👗 9155563397 👗 Top Class Call Girl Service Ban...
 
Call Girls Alandi Road Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Road Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Alandi Road Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Road Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
Chintamani Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ba...
Chintamani Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ba...Chintamani Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ba...
Chintamani Call Girls Service: ☎ 7737669865 ☎ High Profile Model Escorts | Ba...
 
Call Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Sa...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Sa...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Sa...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Sa...
 
Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
Call Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...
Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...
Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...
 
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...
Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...
Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...
 
Just Call Vip call girls fazilka Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls fazilka Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls fazilka Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls fazilka Escorts ☎️9352988975 Two shot with one girl ...
 
➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men 🔝Nandyal🔝 Escorts...
➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men  🔝Nandyal🔝   Escorts...➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men  🔝Nandyal🔝   Escorts...
➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men 🔝Nandyal🔝 Escorts...
 
Call Girls In Sarjapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Sarjapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Sarjapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Sarjapur Road ☎ 7737669865 🥵 Book Your One night Stand
 

Introduction to oop with c++

  • 1. INTRODUCTION TO OBJECT - ORIENTED PROGRAMMING PREPARED BY Patel Shruti J. BE- 4th sem
  • 2. Programming Languages • Programming languages allow programmers to code software. • The three major families of languages are: – Machine languages – Assembly languages – High-Level languages
  • 3. Machine Languages • Comprised of 1s and 0s • The “native” language of a computer • Difficult to program – one misplaced 1 or 0 will cause the program to fail. • Example of code: 1110100010101 111010101110 10111010110100 10100011110111
  • 4. Assembly Languages • Assembly languages are a step towards easier programming. • Each assembly language is specific to a particular computer architecture. • Assembly language code needs to be translated to machine language before the computer processes it. • They are translated by an assembler into machine language. • Assembly language uses mnemonic to represent each low level machine instruction or opcode, also each architectural register,flag.
  • 5. High-Level Languages • High-level languages represent a giant leap towards easier programming. • The syntax of HL languages is similar to English. • It is converted into machine level language by compiler. • Historically, we divide HL languages into two groups: – Procedure oriented programming – Object-Oriented programming (OOP)
  • 6. Procedure oriented programming • Early high-level languages are typically called procedural languages. • Procedural languages are characterized by sequential sets of linear commands. The focus of such languages is on structure. • Examples include C, COBOL, Fortran, LISP, Perl, HTML, VBScript
  • 8. Procedure oriented programming • Features :  Emphasis is on procedure of doing things.  Larger programs are divided into smaller programs called functions.  Data can move openly around the system from function to function.  Adding of data and function is difficult.  Top down approach in program design.
  • 9. Object-Oriented Programming Definition of OOP: • Object oriented programming is a programming methodology that associates data structures with a set of operators which act upon it.
  • 10. Object-Oriented Programming • Most object-oriented languages are high-level languages. • The focus of OOP languages is not on structure, but on modeling data. • Programmers code using “blueprints” of data models called classes. • Examples of OOP languages include C++, Visual Basic.NET and Java.
  • 12. Object-Oriented Programming • Features :  Emphasis is on data.  Programs are divided into objects and classes.  Data is hidden and cannot be accessed by the external function.  New data and functions can be added when necessary.  Bottom up approach in program design.
  • 13. Elements of OOP • Objects • Classes • Encapsulation • Data Abstraction • Inheritance • Polymorphism • Message Passing
  • 14. Objects • OOP uses objects as its fundamental building blocks. • Objects are the basic run-time entities in an object- oriented system. • Every object is associated with data and functions which define meaningful operations on that object. • Object is a real world existing entity. • Object is an Instance of a particular class.
  • 17. Class • Class is a collection of similar objects. • Mango, Apple etc. are objects and their class is Fruit.
  • 18. Encapsulation • Wrapping up of data and functions into a single unit (class) is called encapsulation. • Data is not accessible to outside world. • Only those functions which are which are wrapped in the class can access it.
  • 19. Data Abstraction • A data abstraction is a simplified view of an object that includes only features one is interested in while hides away the unnecessary details. • Data abstraction becomes an abstract data type (ADT)or a user-defined type.
  • 20. Inheritance • Inheritance is the mechanism to provides the power of reusability and extendibility. • Inheritance is the process by which one object can acquire the properties of another object. • Types :  Single  Multilevel  Multiple  Hybrid  Hierarchical
  • 22. Polymorphism • Poly means many. Morphism means forms. • Polymorphism means that the same thing can exist in two forms. • Polymorphism is in short the ability to call different functions by just using one type of function call. • Ex : Bank can be used as - bank (river) - bank (finance)
  • 23. Message Passing • Information or message of one object can be sent to other object. • Object communicate with one another by sending and receiving information much the same way as people communicate with each other. • A message for an object is a request for execution of a proedure and it will invoke a procedure in receiving object that generates the desired result.
  • 24. Message Passing • Message passing involves specifying the name of the object, the name of the function and the information to be sent. • Ex- employee.salary(name); Object Message Information
  • 25. Benefits of OOP • Through inheritance we can extend the use of existing classes. • Build secure program by data hiding. • Message passing techniques for communication between objects make is much simplier. • It is easy to partition the work in a project based on object.
  • 26. Applications of OOP • Database management systems • Data security • Artificial intelligence and expert systems • Mobile computing • Real time systems • Simulation and modeling • Distributed computing