SlideShare ist ein Scribd-Unternehmen logo
1 von 35
1
Object Oriented Programming
Development
By:
Anoop Gupta
SoftEra Informative
C-DAC Training
Email:
softera.informative@gmail.c
om
Oops ?
Object oriented programming is a
programming paradigm which uses
objects and its interactions to design
applications and computer programs.
Simula67 was the first object-oriented
programming language. Java, Python, C+
+, Visual Basic .NET and Ruby are the
most popular OOP languages today.
2
Oops Features ?
Class
Object
Encapsulation
Abstraction
Polymorphism
Inheritance
3
Class ?
Classes are user-defined (programmer-
defined) types.
Data (data members)
Functions (member functions or methods)
In other words, they are structures +
functions
Classes are logical entity which defines
behaviors and property for Object
4
Class
Examples -
•Animals
•Human
•Books
•Cricketer 5
Classes in C++
A class definition begins with the keyword
class.
The body of the class is contained within a
set of braces, { } ; (notice the semi-colon)
6
Class class_Name
{ ………
………
……..
};
Any valid identifier
Class body (data
member + methodsmethods)
Object ?
Object is a real time entity which exist
physically
Object occupy some space into memory
Every object have some specific property
and behavior but all objects from the
same class share common property and
behavior
7
Objects ?
•Animals
8
9
What are we doing today?
Introduction of:
the lecturer
Objects
Basic Terminology
C++
the module
Object
Fruits
10
Abstraction ?
Abstraction is another good feature of
OOPS. Abstraction means to show only
the necessary details to the client of the
object.
Abstraction says that hide un necessary
detail from the user which are not required
them
11
Abstraction
Abstraction
12
Encapsulation
Encapsulation is a process of binding or
wrapping the data and the codes that
operates on the data into a single entity.
This keeps the data safe from outside
interface and misuse.
Encapsulation Provide data security .
13
Encapsulation
Encapsulation defines the access levels
for elements of that class. These access
levels define the access rights to the data,
allowing us to access the data by a
method of that particular class itself, from
aninheritance class, or even from any
other class. There are three levels of
access:
14
Encapsulation
– Encapsulation
15
Polymorphism
16
17
What is Object Oriented
Programming?
An object is like a
black box.
The internal
details are
hidden.
Identifying objects and
assigning responsibilities to
these objects.
Objects communicate to
other objects by sending
messages.
Messages are received by
the methods of an object
18
What is an object?
Tangible Things as a car, printer, ...
Roles as employee, boss, ...
Incidents as flight, overflow, ...
Interactions as contract, sale, ...
Specifications as colour, shape, …
19
So, what are objects?
an object represents an individual,
identifiable item, unit, or entity, either real
or abstract, with a well-defined role in the
problem domain.
Or
An "object" is anything to which a concept
applies.
Etc.
20
Why do we care about
objects?
Modularity - large software projects
can be split up in smaller pieces.
Reuseability - Programs can be
assembled from pre-written software
components.
Extensibility - New software
components can be written or
developed from existing ones.
Example: The Person class
#include<string>
#include<iostream>
class Person{
char name[20];
int yearOfBirth;
public:
void displayDetails() {
cout << name << " born in "
<< yearOfBirth << endl;
}
//...
};
private
data
public
processes
22
The two parts of an object
Object = Data + Methods
or to say the same differently:
An object has the responsibility to know and
the responsibility to do.
= +
23
Basic Terminology
Abstraction is the representation of the
essential features of an object. These are
‘encapsulated’ into an abstract data type.
Encapsulation is the practice of including
in an object everything it needs hidden
from other objects. The internal state is
usually not accessible by other objects.
24
Basic Terminology:
Inheritance
Inheritance means that one class inherits
the characteristics of another class.
This is also called a “is a” relationship:
A car is a vehicle
A teacher is a person
A dog is an animal
25
Basic Terminology:
Polymorphism
Polymorphism means “having many
forms”. It allows different objects to
respond to the same message in different
ways, the response specific to the type of
the object.
E.g. the message displayDetails() of the
Person class should give different
results when send to a Student object
(e.g. the enrolment number).
26
Basic Terminology:
Aggregation
Aggregation describes a “has a”
relationship. One object is a part of
another object.
We distinguish between composite
aggregation (the composite “owns” the
part) and shared aggregation (the part is
shared by more then one composite).
A car has wheels.
27
Basic Terminology:
Behaviour and Messages
The most important aspect of an object is
its behaviour (the things it can do). A
behaviour is initiated by sending a
message to the object (usually by calling
a method).
28
The two steps of Object
Oriented Programming
Making Classes: Creating, extending or
reusing abstract data types.
Making Objects interact: Creating objects
from abstract data types and defining their
relationships.
29
Historical Notes
C++ owes most to C.
Other ancestors are Simula67
and Algol68.
First versions of C++ in 1980 under the
name “C with classes”. Since 1983 the
name C++ is used.
1990: ANSI/ISO 9899 defines a standard
for C
1998: ISO/IEC 14882 specifies the
standard for C++
C++ 1987
30
C++ and C
C is a subset of C++.
Advantages: Existing C libraries can be
used, efficient code can be generated.
But: C++ has the same caveats and
problems as C (e.g. pointer arithmetic,…).
C++ can be used both as a low level and
as a high level language.
We focus on the
high level aspects.
31
C++ and Java
Java is a full object oriented language, all
code has to go into classes.
C++ - in contrast - is a hybrid language,
capable both of functional and object
oriented programming.
So, C++ is more powerful but also
more difficult to handle than Java.
32
Module Outline
Introduction
The non object
oriented basics
Classes
Design Approaches
Testing
Inheritance
Aggregation
Polymorphism
Multifile Development
33
Assessment Details
50% in course and 50% exam.
For more details for the in course
assignment see separate handout.
34
Books
Teach Yourself C++ in 10 minutes,
J. Liberty, SAMS 1999.
C++ - How to program, Deitel & Deitel,
Prentice Hall, 2001.
Object Oriented Programming with C++,
David Parson, Letts Educational, London
1997.
35
Websites
A C++ online tutorial:
http://www.cplusplus.com/doc/tutorial/
The C++ FAQ:
http://www.parashift.com/c++-faq-lite
The homepage of Bjarne Stroustrup, the
inventor of C++:
http://www.research.att.com/~bs
And many, many more!

Weitere ähnliche Inhalte

Was ist angesagt?

Object Oriented Programming using C++ Part II
Object Oriented Programming using C++ Part IIObject Oriented Programming using C++ Part II
Object Oriented Programming using C++ Part IIAjit Nayak
 
Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)Nuzhat Memon
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts246paa
 
C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]Rome468
 
Learn C# Programming - Encapsulation & Methods
Learn C# Programming - Encapsulation & MethodsLearn C# Programming - Encapsulation & Methods
Learn C# Programming - Encapsulation & MethodsEng Teong Cheah
 
C# programming : Chapter One
C# programming : Chapter OneC# programming : Chapter One
C# programming : Chapter OneKhairi Aiman
 
Object Oriented Programming with C#
Object Oriented Programming with C#Object Oriented Programming with C#
Object Oriented Programming with C#foreverredpb
 
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
OBJECT ORIENTED ROGRAMMING With Question And Answer  FullOBJECT ORIENTED ROGRAMMING With Question And Answer  Full
OBJECT ORIENTED ROGRAMMING With Question And Answer FullManas Rai
 
Very short OOP Introduction
Very short OOP IntroductionVery short OOP Introduction
Very short OOP IntroductionCristian G
 
Introduction to oop
Introduction to oop Introduction to oop
Introduction to oop Kumar
 
Advanced Language Technologies for Mathematical Markup
Advanced Language Technologies for Mathematical MarkupAdvanced Language Technologies for Mathematical Markup
Advanced Language Technologies for Mathematical MarkupOlga Caprotti
 

Was ist angesagt? (20)

Object Oriented Programming using C++ Part II
Object Oriented Programming using C++ Part IIObject Oriented Programming using C++ Part II
Object Oriented Programming using C++ Part II
 
Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 
C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]
 
Four Pillers Of OOPS
Four Pillers Of OOPSFour Pillers Of OOPS
Four Pillers Of OOPS
 
Learn C# Programming - Encapsulation & Methods
Learn C# Programming - Encapsulation & MethodsLearn C# Programming - Encapsulation & Methods
Learn C# Programming - Encapsulation & Methods
 
2 Object Oriented Programming
2 Object Oriented Programming2 Object Oriented Programming
2 Object Oriented Programming
 
C# programming : Chapter One
C# programming : Chapter OneC# programming : Chapter One
C# programming : Chapter One
 
Birasa 1
Birasa 1Birasa 1
Birasa 1
 
JAVA PROGRAMMINGD
JAVA PROGRAMMINGDJAVA PROGRAMMINGD
JAVA PROGRAMMINGD
 
Oop concepts
Oop conceptsOop concepts
Oop concepts
 
Object Oriented Programming with C#
Object Oriented Programming with C#Object Oriented Programming with C#
Object Oriented Programming with C#
 
Oop ppt
Oop pptOop ppt
Oop ppt
 
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
OBJECT ORIENTED ROGRAMMING With Question And Answer  FullOBJECT ORIENTED ROGRAMMING With Question And Answer  Full
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
 
Ah java-ppt2
Ah java-ppt2Ah java-ppt2
Ah java-ppt2
 
Classroom Object Oriented Language (COOL)
Classroom Object Oriented Language (COOL)Classroom Object Oriented Language (COOL)
Classroom Object Oriented Language (COOL)
 
Very short OOP Introduction
Very short OOP IntroductionVery short OOP Introduction
Very short OOP Introduction
 
Introduction to oop
Introduction to oop Introduction to oop
Introduction to oop
 
Java
JavaJava
Java
 
Advanced Language Technologies for Mathematical Markup
Advanced Language Technologies for Mathematical MarkupAdvanced Language Technologies for Mathematical Markup
Advanced Language Technologies for Mathematical Markup
 

Andere mochten auch

Ace enablers energy saving machine uptime-harmonic mitigation
Ace enablers energy saving machine uptime-harmonic mitigationAce enablers energy saving machine uptime-harmonic mitigation
Ace enablers energy saving machine uptime-harmonic mitigationSrinivasan Jeyaram
 
POWER HARMONICS- SOURCES, ISSUES AND MITIGATION
POWER HARMONICS- SOURCES, ISSUES AND MITIGATIONPOWER HARMONICS- SOURCES, ISSUES AND MITIGATION
POWER HARMONICS- SOURCES, ISSUES AND MITIGATIONASHIKS842
 
Harmonic waves
Harmonic wavesHarmonic waves
Harmonic wavesAlison Wu
 
Harmonics and mitigation techniques
Harmonics and mitigation techniquesHarmonics and mitigation techniques
Harmonics and mitigation techniquesrifat maryum
 
Harmonics mitigation solutions
Harmonics mitigation solutionsHarmonics mitigation solutions
Harmonics mitigation solutionsFahad Shaikh
 
Harmonics: Causes and Effects
Harmonics: Causes and EffectsHarmonics: Causes and Effects
Harmonics: Causes and EffectsLeonardo ENERGY
 
harmonic distortion ppt
harmonic distortion pptharmonic distortion ppt
harmonic distortion pptAditi Tiwari
 
Harmonics in power system
Harmonics in power systemHarmonics in power system
Harmonics in power systemMinh Anh Nguyen
 
MicroGrid and Energy Storage System COMPLETE DETAILS NEW PPT
MicroGrid and Energy Storage System COMPLETE DETAILS NEW PPTMicroGrid and Energy Storage System COMPLETE DETAILS NEW PPT
MicroGrid and Energy Storage System COMPLETE DETAILS NEW PPT Abin Baby
 
Microgrid Presentation
Microgrid PresentationMicrogrid Presentation
Microgrid PresentationShahab Khan
 

Andere mochten auch (15)

Ace enablers energy saving machine uptime-harmonic mitigation
Ace enablers energy saving machine uptime-harmonic mitigationAce enablers energy saving machine uptime-harmonic mitigation
Ace enablers energy saving machine uptime-harmonic mitigation
 
Harmonics
HarmonicsHarmonics
Harmonics
 
POWER HARMONICS- SOURCES, ISSUES AND MITIGATION
POWER HARMONICS- SOURCES, ISSUES AND MITIGATIONPOWER HARMONICS- SOURCES, ISSUES AND MITIGATION
POWER HARMONICS- SOURCES, ISSUES AND MITIGATION
 
Harmonic waves
Harmonic wavesHarmonic waves
Harmonic waves
 
Harmonics and mitigation techniques
Harmonics and mitigation techniquesHarmonics and mitigation techniques
Harmonics and mitigation techniques
 
Harmonics mitigation solutions
Harmonics mitigation solutionsHarmonics mitigation solutions
Harmonics mitigation solutions
 
Ps harmonics
Ps harmonicsPs harmonics
Ps harmonics
 
Hormonics impact and_mitigation
Hormonics impact and_mitigationHormonics impact and_mitigation
Hormonics impact and_mitigation
 
Harmonics: Causes and Effects
Harmonics: Causes and EffectsHarmonics: Causes and Effects
Harmonics: Causes and Effects
 
Simple harmonic motion
Simple harmonic motionSimple harmonic motion
Simple harmonic motion
 
harmonic distortion ppt
harmonic distortion pptharmonic distortion ppt
harmonic distortion ppt
 
Harmonics in power system
Harmonics in power systemHarmonics in power system
Harmonics in power system
 
Microgrid
MicrogridMicrogrid
Microgrid
 
MicroGrid and Energy Storage System COMPLETE DETAILS NEW PPT
MicroGrid and Energy Storage System COMPLETE DETAILS NEW PPTMicroGrid and Energy Storage System COMPLETE DETAILS NEW PPT
MicroGrid and Energy Storage System COMPLETE DETAILS NEW PPT
 
Microgrid Presentation
Microgrid PresentationMicrogrid Presentation
Microgrid Presentation
 

Ähnlich wie Week1

Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Languagedheva B
 
SE_Lec 06_Object Oriented Analysis and Design
SE_Lec 06_Object Oriented Analysis and DesignSE_Lec 06_Object Oriented Analysis and Design
SE_Lec 06_Object Oriented Analysis and DesignAmr E. Mohamed
 
SE18_Lec 06_Object Oriented Analysis and Design
SE18_Lec 06_Object Oriented Analysis and DesignSE18_Lec 06_Object Oriented Analysis and Design
SE18_Lec 06_Object Oriented Analysis and DesignAmr E. Mohamed
 
1 intro
1 intro1 intro
1 introabha48
 
1207028 634528828886611250
1207028 6345288288866112501207028 634528828886611250
1207028 634528828886611250Akhil Nama
 
Oop.concepts
Oop.conceptsOop.concepts
Oop.conceptstahir266
 
Object oriented programming C++
Object oriented programming C++Object oriented programming C++
Object oriented programming C++AkshtaSuryawanshi
 
OO Development 4 - Object Concepts
OO Development 4 - Object ConceptsOO Development 4 - Object Concepts
OO Development 4 - Object ConceptsRandy Connolly
 
Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.pptTigistTilahun1
 
Object And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) LanguagesObject And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) LanguagesJessica Deakin
 
c++session 1.pptx
c++session 1.pptxc++session 1.pptx
c++session 1.pptxPadmaN24
 
C++ largest no between three nos
C++ largest no between three nosC++ largest no between three nos
C++ largest no between three noskrismishra
 
CPP_,module2_1.pptx
CPP_,module2_1.pptxCPP_,module2_1.pptx
CPP_,module2_1.pptxAbhilashTom4
 

Ähnlich wie Week1 (20)

Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Language
 
C++ interview question
C++ interview questionC++ interview question
C++ interview question
 
SE_Lec 06_Object Oriented Analysis and Design
SE_Lec 06_Object Oriented Analysis and DesignSE_Lec 06_Object Oriented Analysis and Design
SE_Lec 06_Object Oriented Analysis and Design
 
SE18_Lec 06_Object Oriented Analysis and Design
SE18_Lec 06_Object Oriented Analysis and DesignSE18_Lec 06_Object Oriented Analysis and Design
SE18_Lec 06_Object Oriented Analysis and Design
 
1 intro
1 intro1 intro
1 intro
 
1207028 634528828886611250
1207028 6345288288866112501207028 634528828886611250
1207028 634528828886611250
 
Unit 5.ppt
Unit 5.pptUnit 5.ppt
Unit 5.ppt
 
Oop.concepts
Oop.conceptsOop.concepts
Oop.concepts
 
Object oriented programming C++
Object oriented programming C++Object oriented programming C++
Object oriented programming C++
 
Java pdf
Java   pdfJava   pdf
Java pdf
 
OO Development 4 - Object Concepts
OO Development 4 - Object ConceptsOO Development 4 - Object Concepts
OO Development 4 - Object Concepts
 
Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.ppt
 
Object And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) LanguagesObject And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) Languages
 
Java chapter 3
Java   chapter 3Java   chapter 3
Java chapter 3
 
c++session 1.pptx
c++session 1.pptxc++session 1.pptx
c++session 1.pptx
 
JAVA PROGRAMMING
JAVA PROGRAMMING JAVA PROGRAMMING
JAVA PROGRAMMING
 
C++ largest no between three nos
C++ largest no between three nosC++ largest no between three nos
C++ largest no between three nos
 
Mca 504 dotnet_unit3
Mca 504 dotnet_unit3Mca 504 dotnet_unit3
Mca 504 dotnet_unit3
 
CPP_,module2_1.pptx
CPP_,module2_1.pptxCPP_,module2_1.pptx
CPP_,module2_1.pptx
 

Mehr von Siya Agarwal

Whats digital marketing
Whats digital marketingWhats digital marketing
Whats digital marketingSiya Agarwal
 
amrapali la residentia
amrapali la residentiaamrapali la residentia
amrapali la residentiaSiya Agarwal
 
Solar home lighting system
Solar home lighting systemSolar home lighting system
Solar home lighting systemSiya Agarwal
 
Solar charge controller
Solar charge controllerSolar charge controller
Solar charge controllerSiya Agarwal
 
Presentation on venturi
Presentation on venturiPresentation on venturi
Presentation on venturiSiya Agarwal
 
Presentation on sparkler filter bag
Presentation on sparkler filter bagPresentation on sparkler filter bag
Presentation on sparkler filter bagSiya Agarwal
 
Presentation on screening mesh
Presentation on screening meshPresentation on screening mesh
Presentation on screening meshSiya Agarwal
 
Presentation on reverse air type filter bag
Presentation on reverse air type filter bagPresentation on reverse air type filter bag
Presentation on reverse air type filter bagSiya Agarwal
 
Presentation on pulveriser sleeve
Presentation on pulveriser sleevePresentation on pulveriser sleeve
Presentation on pulveriser sleeveSiya Agarwal
 
Presentation on pp cartridge housing filter
Presentation on pp cartridge housing filterPresentation on pp cartridge housing filter
Presentation on pp cartridge housing filterSiya Agarwal
 
Presentation on nutsche filter bag
Presentation on nutsche filter bagPresentation on nutsche filter bag
Presentation on nutsche filter bagSiya Agarwal
 
Presentation on geotextile
Presentation on geotextilePresentation on geotextile
Presentation on geotextileSiya Agarwal
 
Presentation on fine bubble diffuser
Presentation on fine bubble diffuserPresentation on fine bubble diffuser
Presentation on fine bubble diffuserSiya Agarwal
 
Presentation on FBD filter bags
Presentation on FBD filter bagsPresentation on FBD filter bags
Presentation on FBD filter bagsSiya Agarwal
 
Presentation on candle filter bag
Presentation on candle filter bagPresentation on candle filter bag
Presentation on candle filter bagSiya Agarwal
 
Presentation on waste water diffuser
Presentation on waste water diffuserPresentation on waste water diffuser
Presentation on waste water diffuserSiya Agarwal
 
Presentation on support cages
Presentation on support cagesPresentation on support cages
Presentation on support cagesSiya Agarwal
 

Mehr von Siya Agarwal (20)

Whats digital marketing
Whats digital marketingWhats digital marketing
Whats digital marketing
 
amrapali la residentia
amrapali la residentiaamrapali la residentia
amrapali la residentia
 
Anode filter bags
Anode filter bagsAnode filter bags
Anode filter bags
 
Pmp west delhi
Pmp west delhiPmp west delhi
Pmp west delhi
 
Solar home lighting system
Solar home lighting systemSolar home lighting system
Solar home lighting system
 
Solar off grid
Solar off gridSolar off grid
Solar off grid
 
Solar charge controller
Solar charge controllerSolar charge controller
Solar charge controller
 
Presentation on venturi
Presentation on venturiPresentation on venturi
Presentation on venturi
 
Presentation on sparkler filter bag
Presentation on sparkler filter bagPresentation on sparkler filter bag
Presentation on sparkler filter bag
 
Presentation on screening mesh
Presentation on screening meshPresentation on screening mesh
Presentation on screening mesh
 
Presentation on reverse air type filter bag
Presentation on reverse air type filter bagPresentation on reverse air type filter bag
Presentation on reverse air type filter bag
 
Presentation on pulveriser sleeve
Presentation on pulveriser sleevePresentation on pulveriser sleeve
Presentation on pulveriser sleeve
 
Presentation on pp cartridge housing filter
Presentation on pp cartridge housing filterPresentation on pp cartridge housing filter
Presentation on pp cartridge housing filter
 
Presentation on nutsche filter bag
Presentation on nutsche filter bagPresentation on nutsche filter bag
Presentation on nutsche filter bag
 
Presentation on geotextile
Presentation on geotextilePresentation on geotextile
Presentation on geotextile
 
Presentation on fine bubble diffuser
Presentation on fine bubble diffuserPresentation on fine bubble diffuser
Presentation on fine bubble diffuser
 
Presentation on FBD filter bags
Presentation on FBD filter bagsPresentation on FBD filter bags
Presentation on FBD filter bags
 
Presentation on candle filter bag
Presentation on candle filter bagPresentation on candle filter bag
Presentation on candle filter bag
 
Presentation on waste water diffuser
Presentation on waste water diffuserPresentation on waste water diffuser
Presentation on waste water diffuser
 
Presentation on support cages
Presentation on support cagesPresentation on support cages
Presentation on support cages
 

Kürzlich hochgeladen

How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
Revolutionizing SAP® Processes with Automation and Artificial Intelligence
Revolutionizing SAP® Processes with Automation and Artificial IntelligenceRevolutionizing SAP® Processes with Automation and Artificial Intelligence
Revolutionizing SAP® Processes with Automation and Artificial IntelligencePrecisely
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityVictorSzoltysek
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Skynet Technologies
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandIES VE
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctBrainSell Technologies
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfalexjohnson7307
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxjbellis
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Hiroshi SHIBATA
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxMasterG
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewDianaGray10
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 

Kürzlich hochgeladen (20)

How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Revolutionizing SAP® Processes with Automation and Artificial Intelligence
Revolutionizing SAP® Processes with Automation and Artificial IntelligenceRevolutionizing SAP® Processes with Automation and Artificial Intelligence
Revolutionizing SAP® Processes with Automation and Artificial Intelligence
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 

Week1

  • 1. 1 Object Oriented Programming Development By: Anoop Gupta SoftEra Informative C-DAC Training Email: softera.informative@gmail.c om
  • 2. Oops ? Object oriented programming is a programming paradigm which uses objects and its interactions to design applications and computer programs. Simula67 was the first object-oriented programming language. Java, Python, C+ +, Visual Basic .NET and Ruby are the most popular OOP languages today. 2
  • 4. Class ? Classes are user-defined (programmer- defined) types. Data (data members) Functions (member functions or methods) In other words, they are structures + functions Classes are logical entity which defines behaviors and property for Object 4
  • 6. Classes in C++ A class definition begins with the keyword class. The body of the class is contained within a set of braces, { } ; (notice the semi-colon) 6 Class class_Name { ……… ……… …….. }; Any valid identifier Class body (data member + methodsmethods)
  • 7. Object ? Object is a real time entity which exist physically Object occupy some space into memory Every object have some specific property and behavior but all objects from the same class share common property and behavior 7
  • 9. 9 What are we doing today? Introduction of: the lecturer Objects Basic Terminology C++ the module
  • 11. Abstraction ? Abstraction is another good feature of OOPS. Abstraction means to show only the necessary details to the client of the object. Abstraction says that hide un necessary detail from the user which are not required them 11
  • 13. Encapsulation Encapsulation is a process of binding or wrapping the data and the codes that operates on the data into a single entity. This keeps the data safe from outside interface and misuse. Encapsulation Provide data security . 13
  • 14. Encapsulation Encapsulation defines the access levels for elements of that class. These access levels define the access rights to the data, allowing us to access the data by a method of that particular class itself, from aninheritance class, or even from any other class. There are three levels of access: 14
  • 17. 17 What is Object Oriented Programming? An object is like a black box. The internal details are hidden. Identifying objects and assigning responsibilities to these objects. Objects communicate to other objects by sending messages. Messages are received by the methods of an object
  • 18. 18 What is an object? Tangible Things as a car, printer, ... Roles as employee, boss, ... Incidents as flight, overflow, ... Interactions as contract, sale, ... Specifications as colour, shape, …
  • 19. 19 So, what are objects? an object represents an individual, identifiable item, unit, or entity, either real or abstract, with a well-defined role in the problem domain. Or An "object" is anything to which a concept applies. Etc.
  • 20. 20 Why do we care about objects? Modularity - large software projects can be split up in smaller pieces. Reuseability - Programs can be assembled from pre-written software components. Extensibility - New software components can be written or developed from existing ones.
  • 21. Example: The Person class #include<string> #include<iostream> class Person{ char name[20]; int yearOfBirth; public: void displayDetails() { cout << name << " born in " << yearOfBirth << endl; } //... }; private data public processes
  • 22. 22 The two parts of an object Object = Data + Methods or to say the same differently: An object has the responsibility to know and the responsibility to do. = +
  • 23. 23 Basic Terminology Abstraction is the representation of the essential features of an object. These are ‘encapsulated’ into an abstract data type. Encapsulation is the practice of including in an object everything it needs hidden from other objects. The internal state is usually not accessible by other objects.
  • 24. 24 Basic Terminology: Inheritance Inheritance means that one class inherits the characteristics of another class. This is also called a “is a” relationship: A car is a vehicle A teacher is a person A dog is an animal
  • 25. 25 Basic Terminology: Polymorphism Polymorphism means “having many forms”. It allows different objects to respond to the same message in different ways, the response specific to the type of the object. E.g. the message displayDetails() of the Person class should give different results when send to a Student object (e.g. the enrolment number).
  • 26. 26 Basic Terminology: Aggregation Aggregation describes a “has a” relationship. One object is a part of another object. We distinguish between composite aggregation (the composite “owns” the part) and shared aggregation (the part is shared by more then one composite). A car has wheels.
  • 27. 27 Basic Terminology: Behaviour and Messages The most important aspect of an object is its behaviour (the things it can do). A behaviour is initiated by sending a message to the object (usually by calling a method).
  • 28. 28 The two steps of Object Oriented Programming Making Classes: Creating, extending or reusing abstract data types. Making Objects interact: Creating objects from abstract data types and defining their relationships.
  • 29. 29 Historical Notes C++ owes most to C. Other ancestors are Simula67 and Algol68. First versions of C++ in 1980 under the name “C with classes”. Since 1983 the name C++ is used. 1990: ANSI/ISO 9899 defines a standard for C 1998: ISO/IEC 14882 specifies the standard for C++ C++ 1987
  • 30. 30 C++ and C C is a subset of C++. Advantages: Existing C libraries can be used, efficient code can be generated. But: C++ has the same caveats and problems as C (e.g. pointer arithmetic,…). C++ can be used both as a low level and as a high level language. We focus on the high level aspects.
  • 31. 31 C++ and Java Java is a full object oriented language, all code has to go into classes. C++ - in contrast - is a hybrid language, capable both of functional and object oriented programming. So, C++ is more powerful but also more difficult to handle than Java.
  • 32. 32 Module Outline Introduction The non object oriented basics Classes Design Approaches Testing Inheritance Aggregation Polymorphism Multifile Development
  • 33. 33 Assessment Details 50% in course and 50% exam. For more details for the in course assignment see separate handout.
  • 34. 34 Books Teach Yourself C++ in 10 minutes, J. Liberty, SAMS 1999. C++ - How to program, Deitel & Deitel, Prentice Hall, 2001. Object Oriented Programming with C++, David Parson, Letts Educational, London 1997.
  • 35. 35 Websites A C++ online tutorial: http://www.cplusplus.com/doc/tutorial/ The C++ FAQ: http://www.parashift.com/c++-faq-lite The homepage of Bjarne Stroustrup, the inventor of C++: http://www.research.att.com/~bs And many, many more!