SlideShare a Scribd company logo
1 
CHAPTER 5 
What Is Object- 
Orientation? 
SOFTWARE SYSTEM 
ENGINEERING 
(260CT)
In This Lecture You Will Learn: 
The fundamental concepts of object-orientation 
The justifications for an object-oriented 
approach 
2
3 
Basic Concepts 
The main concepts introduced here are: 
• Objects, Classes and Instances 
• Object State 
• Generalization and Specialization 
• Message-passing and Encapsulation 
• Polymorphism
4 
Objects 
An object is: 
“an abstraction of something in a 
problem domain, reflecting the 
capabilities of the system to 
• keep information about it, 
• interact with it, 
• or both.” 
Coad and Yourdon (1990)
Objects 
“Objects have state, behaviour and 
identity.” 
Booch (1994) 
State: the condition of an object at any 
moment, affecting how it can behave 
Behaviour: what an object can do, how it 
can respond to events and stimuli 
Identity: each object is unique 
5
Identity Behaviour State 
6 
Examples of Objects 
Object 
A person. ‘Hussain Pervez.’ Speak, walk, read. 
Studying, resting, 
qualified. 
A shirt. My favourite button 
white denim shirt. Shrink, stain, rip. Pressed, dirty, 
worn. 
A sale. Sale no #0015, 
16/06/02. 
Earn loyalty points. Invoiced, 
cancelled. 
A bottle of 
ketchup. 
This bottle of 
ketchup. 
Spill in transit. Unsold, opened, 
empty.
Class and Instance 
All objects are instances of some class 
Class: 
“a description of a set of objects with 
similar 
• attributes, 
• operations, 
• methods 
• relationships and semantics.” 
OMG (2001) 
7
Class and Instance 
“The purpose of a class is to declare a 
collection of methods, operations and 
attributes that fully describe the structure 
and behaviour of objects.” 
OMG (2001) 
Structure: what an object knows, 
information that it holds 
Behaviour: what an object can do 
8
Class and Instance 
An object is: 
“an instance that originates from a class, 
it is structured and behaves according to 
its class.” 
OMG (2001) 
9
Generalization and 
Specialization 
Classification is hierarchic in nature 
For example, a person may be an 
employee, a customer, a supplier of a 
service 
An employee may be paid monthly, 
weekly or hourly 
An hourly paid employee may be a 
driver, a cleaner, a sales assistant 
10
11 
Specialization Hierarchy 
Person 
Employee Customer Supplier 
monthly 
paid 
weekly 
paid 
hourly 
paid 
Driver Cleaner Sales 
assistant 
More general 
(superclasses) 
More specialized 
(subclasses)
General (superclass) Specialized (subclass) 
12 
Generalization and 
Specialization 
More general bits of description are 
abstracted out from specialized classes: 
Person 
Name 
Date of birth 
Gender 
Title 
HourlyPaidDriver 
StartDate 
StandardRate 
OvertimeRate 
LicenceType
Inheritance 
The whole description of a superclass 
applies to all its subclasses, including: 
• Information structure 
• Behaviour 
Often known loosely as inheritance 
(Actually, inheritance is the facility in an 
O-O language that implements 
generalization / specialization) 
13
Message-passing 
Several objects may collaborate to fulfil 
each system action 
“Record CD sale” could involve: 
• A CD stock item object 
• A sales transaction object 
• A sales assistant object 
These objects communicate by sending 
each other messages 
14
15 
Message-passing and 
Encapsulation 
Message from another object 
requests a service. 
Operation called only via valid 
operation signature. 
Data accessed only by 
object’s own operations. 
An object’s data 
is hidden 
(encapsulated). 
‘Layers of an onion’ 
model of an object: 
An outer layer of 
operation signatures… 
…gives access to middle 
layer of operations… 
…which can access 
inner core of data
Polymorphism 
Polymorphism allows one message to be 
sent to objects of different classes 
Sending object need not know what kind 
of object will receive the message 
Each receiving object knows how to 
respond appropriately 
For example, a ‘resize’ operation in a 
graphics package 
16
<<entity>> 
17 
Polymorphism in Resize 
Operations 
<<entity>> 
Campaign 
title 
campaignStartDate 
campaignFinishDate 
getCampaignAdverts() 
addNewAdvert() 
Campaign 
title 
campaignStartDate 
campaignFinishDate 
getCampaignAdverts() 
addNewAdvert()
18 
Advantages of O-O 
Can save effort 
• Reuse of generalized components cuts work, 
cost and time 
Can improve software quality 
• Encapsulation increases modularity 
• Sub-systems less coupled to each other 
• Better translations between analysis and 
design models and working code
Summary 
In this lecture you have learned about: 
The fundamental concepts of O-O 
• Object, class, instance 
• Generalization and specialization 
• Message-passing and polymorphism 
Some of the advantages and 
justifications of O-O 
19

More Related Content

Viewers also liked

Isu-isu Kekeluargaan - Poligami
Isu-isu Kekeluargaan - PoligamiIsu-isu Kekeluargaan - Poligami
Isu-isu Kekeluargaan - Poligami
Fadhil Ismail
 
Hubungan Etnik Bab-5
Hubungan Etnik Bab-5Hubungan Etnik Bab-5
Hubungan Etnik Bab-5
Fadhil Ismail
 
Hubungan Etnik Bab-6
Hubungan Etnik Bab-6Hubungan Etnik Bab-6
Hubungan Etnik Bab-6
Fadhil Ismail
 
Hubungan Etnik Bab-2
Hubungan Etnik Bab-2Hubungan Etnik Bab-2
Hubungan Etnik Bab-2
Fadhil Ismail
 
Hubungan Etnik Bab 3
Hubungan Etnik Bab 3Hubungan Etnik Bab 3
Hubungan Etnik Bab 3
Fadhil Ismail
 
Reproductive behaviour: 1-Sexual behaviour in animals
Reproductive behaviour: 1-Sexual behaviour in animalsReproductive behaviour: 1-Sexual behaviour in animals
Reproductive behaviour: 1-Sexual behaviour in animals
rhfayed
 
Bab 1 malaysia kesepaduan dalam kepelbagaian
Bab 1  malaysia kesepaduan dalam kepelbagaianBab 1  malaysia kesepaduan dalam kepelbagaian
Bab 1 malaysia kesepaduan dalam kepelbagaianINSTAQLIM
 
Hubungan Etnik Bab-4
Hubungan Etnik Bab-4Hubungan Etnik Bab-4
Hubungan Etnik Bab-4
Fadhil Ismail
 
Hubungan Etnik Bab-1
Hubungan Etnik Bab-1Hubungan Etnik Bab-1
Hubungan Etnik Bab-1
Fadhil Ismail
 
Ooad unit – 1 introduction
Ooad unit – 1 introductionOoad unit – 1 introduction
Ooad unit – 1 introduction
Babeetha Muruganantham
 
Structured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and DesignStructured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and Design
Motaz Saad
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering conceptsKomal Singh
 
Frontpage vs dreamweaver
Frontpage vs dreamweaverFrontpage vs dreamweaver
Frontpage vs dreamweaver
Fadhil Ismail
 

Viewers also liked (13)

Isu-isu Kekeluargaan - Poligami
Isu-isu Kekeluargaan - PoligamiIsu-isu Kekeluargaan - Poligami
Isu-isu Kekeluargaan - Poligami
 
Hubungan Etnik Bab-5
Hubungan Etnik Bab-5Hubungan Etnik Bab-5
Hubungan Etnik Bab-5
 
Hubungan Etnik Bab-6
Hubungan Etnik Bab-6Hubungan Etnik Bab-6
Hubungan Etnik Bab-6
 
Hubungan Etnik Bab-2
Hubungan Etnik Bab-2Hubungan Etnik Bab-2
Hubungan Etnik Bab-2
 
Hubungan Etnik Bab 3
Hubungan Etnik Bab 3Hubungan Etnik Bab 3
Hubungan Etnik Bab 3
 
Reproductive behaviour: 1-Sexual behaviour in animals
Reproductive behaviour: 1-Sexual behaviour in animalsReproductive behaviour: 1-Sexual behaviour in animals
Reproductive behaviour: 1-Sexual behaviour in animals
 
Bab 1 malaysia kesepaduan dalam kepelbagaian
Bab 1  malaysia kesepaduan dalam kepelbagaianBab 1  malaysia kesepaduan dalam kepelbagaian
Bab 1 malaysia kesepaduan dalam kepelbagaian
 
Hubungan Etnik Bab-4
Hubungan Etnik Bab-4Hubungan Etnik Bab-4
Hubungan Etnik Bab-4
 
Hubungan Etnik Bab-1
Hubungan Etnik Bab-1Hubungan Etnik Bab-1
Hubungan Etnik Bab-1
 
Ooad unit – 1 introduction
Ooad unit – 1 introductionOoad unit – 1 introduction
Ooad unit – 1 introduction
 
Structured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and DesignStructured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and Design
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering concepts
 
Frontpage vs dreamweaver
Frontpage vs dreamweaverFrontpage vs dreamweaver
Frontpage vs dreamweaver
 

Similar to Software System Engineering - Chapter 5

Oo concepts and class modeling
Oo concepts and class modelingOo concepts and class modeling
Oo concepts and class modeling
Preeti Mishra
 
Ooad notes
Ooad notesOoad notes
Ooad notes
NancyJP
 
Introducción al Análisis y Diseño Orientado a Objetos
Introducción al Análisis y Diseño Orientado a ObjetosIntroducción al Análisis y Diseño Orientado a Objetos
Introducción al Análisis y Diseño Orientado a Objetos
Universidad de Occidente
 
Handout on Object orienetd Analysis and Design
Handout on Object orienetd Analysis and DesignHandout on Object orienetd Analysis and Design
Handout on Object orienetd Analysis and Design
SAFAD ISMAIL
 
Software Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iSoftware Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-i
Taymoor Nazmy
 
Ooad ch 1_2
Ooad ch 1_2Ooad ch 1_2
Ooad ch 1_2
anujabeatrice2
 
M01_OO_Intro.ppt
M01_OO_Intro.pptM01_OO_Intro.ppt
M01_OO_Intro.ppt
RojaPogul1
 
Object Modelling Technique " ooad "
Object Modelling Technique  " ooad "Object Modelling Technique  " ooad "
Object Modelling Technique " ooad "
AchrafJbr
 
Bt8901 objective oriented systems1
Bt8901 objective oriented systems1Bt8901 objective oriented systems1
Bt8901 objective oriented systems1
Techglyphs
 
OOPS in Java
OOPS in JavaOOPS in Java
OOPS in Java
Zeeshan Khan
 
Oot
OotOot
L1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdfL1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdf
BhanuJatinSingh
 
ItemMirror, XML & The Promise of Information Integration
ItemMirror, XML & The Promise of Information IntegrationItemMirror, XML & The Promise of Information Integration
ItemMirror, XML & The Promise of Information Integrationkeepingfoundthingsfound
 
Introduction to SAD.pptx
Introduction to SAD.pptxIntroduction to SAD.pptx
Introduction to SAD.pptx
azida3
 
Successfully Kickstarting Data Governance's Social Dynamics: Define, Collabor...
Successfully Kickstarting Data Governance's Social Dynamics: Define, Collabor...Successfully Kickstarting Data Governance's Social Dynamics: Define, Collabor...
Successfully Kickstarting Data Governance's Social Dynamics: Define, Collabor...
Stijn (Stan) Christiaens
 
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
Amr E. Mohamed
 
Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1
Synapseindiappsdevelopment
 
Object oriented programming
Object oriented programmingObject oriented programming

Similar to Software System Engineering - Chapter 5 (20)

Bennett chap 4
Bennett chap 4Bennett chap 4
Bennett chap 4
 
Oo concepts and class modeling
Oo concepts and class modelingOo concepts and class modeling
Oo concepts and class modeling
 
Ooad notes
Ooad notesOoad notes
Ooad notes
 
Introducción al Análisis y Diseño Orientado a Objetos
Introducción al Análisis y Diseño Orientado a ObjetosIntroducción al Análisis y Diseño Orientado a Objetos
Introducción al Análisis y Diseño Orientado a Objetos
 
Handout on Object orienetd Analysis and Design
Handout on Object orienetd Analysis and DesignHandout on Object orienetd Analysis and Design
Handout on Object orienetd Analysis and Design
 
Software Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iSoftware Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-i
 
Ooad ch 1_2
Ooad ch 1_2Ooad ch 1_2
Ooad ch 1_2
 
M01_OO_Intro.ppt
M01_OO_Intro.pptM01_OO_Intro.ppt
M01_OO_Intro.ppt
 
Object Modelling Technique " ooad "
Object Modelling Technique  " ooad "Object Modelling Technique  " ooad "
Object Modelling Technique " ooad "
 
Bt8901 objective oriented systems1
Bt8901 objective oriented systems1Bt8901 objective oriented systems1
Bt8901 objective oriented systems1
 
OOPS in Java
OOPS in JavaOOPS in Java
OOPS in Java
 
Oot
OotOot
Oot
 
Lecture 5.pptx
Lecture 5.pptxLecture 5.pptx
Lecture 5.pptx
 
L1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdfL1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdf
 
ItemMirror, XML & The Promise of Information Integration
ItemMirror, XML & The Promise of Information IntegrationItemMirror, XML & The Promise of Information Integration
ItemMirror, XML & The Promise of Information Integration
 
Introduction to SAD.pptx
Introduction to SAD.pptxIntroduction to SAD.pptx
Introduction to SAD.pptx
 
Successfully Kickstarting Data Governance's Social Dynamics: Define, Collabor...
Successfully Kickstarting Data Governance's Social Dynamics: Define, Collabor...Successfully Kickstarting Data Governance's Social Dynamics: Define, Collabor...
Successfully Kickstarting Data Governance's Social Dynamics: Define, Collabor...
 
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
 
Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 

More from Fadhil Ismail

Kertas Kerja Tenis
Kertas Kerja TenisKertas Kerja Tenis
Kertas Kerja Tenis
Fadhil Ismail
 
Contoh Borang Soal Selidik Poligami
Contoh Borang Soal Selidik PoligamiContoh Borang Soal Selidik Poligami
Contoh Borang Soal Selidik Poligami
Fadhil Ismail
 
Software System Engineering - Chapter 13
Software System Engineering - Chapter 13Software System Engineering - Chapter 13
Software System Engineering - Chapter 13
Fadhil Ismail
 
Software System Engineering - Chapter 12
Software System Engineering - Chapter 12Software System Engineering - Chapter 12
Software System Engineering - Chapter 12
Fadhil Ismail
 
Software System Engineering - Chapter 11
Software System Engineering - Chapter 11Software System Engineering - Chapter 11
Software System Engineering - Chapter 11
Fadhil Ismail
 
Software System Engineering - Chapter 10
Software System Engineering - Chapter 10Software System Engineering - Chapter 10
Software System Engineering - Chapter 10
Fadhil Ismail
 
Software System Engineering - Chapter 9
Software System Engineering - Chapter 9Software System Engineering - Chapter 9
Software System Engineering - Chapter 9
Fadhil Ismail
 
Software System Engineering - Chapter 8
Software System Engineering - Chapter 8Software System Engineering - Chapter 8
Software System Engineering - Chapter 8
Fadhil Ismail
 
Software System Engineering - Chapter 7
Software System Engineering - Chapter 7Software System Engineering - Chapter 7
Software System Engineering - Chapter 7
Fadhil Ismail
 
Software System Engineering - Chapter 6
Software System Engineering - Chapter 6Software System Engineering - Chapter 6
Software System Engineering - Chapter 6
Fadhil Ismail
 
Software System Engineering - Chapter 4
Software System Engineering - Chapter 4Software System Engineering - Chapter 4
Software System Engineering - Chapter 4
Fadhil Ismail
 
Software System Engineering - Chapter 3
Software System Engineering - Chapter 3Software System Engineering - Chapter 3
Software System Engineering - Chapter 3
Fadhil Ismail
 
Software System Engineering - Chapter 1
Software System Engineering - Chapter 1Software System Engineering - Chapter 1
Software System Engineering - Chapter 1
Fadhil Ismail
 
Nota pengajian islam mpw 1143 t12
Nota pengajian islam mpw 1143 t12Nota pengajian islam mpw 1143 t12
Nota pengajian islam mpw 1143 t12Fadhil Ismail
 
Nota pengajian islam mpw 1143 t11
Nota pengajian islam mpw 1143 t11Nota pengajian islam mpw 1143 t11
Nota pengajian islam mpw 1143 t11Fadhil Ismail
 
Nota pengajian islam mpw 1143 t10
Nota pengajian islam mpw 1143 t10Nota pengajian islam mpw 1143 t10
Nota pengajian islam mpw 1143 t10Fadhil Ismail
 

More from Fadhil Ismail (16)

Kertas Kerja Tenis
Kertas Kerja TenisKertas Kerja Tenis
Kertas Kerja Tenis
 
Contoh Borang Soal Selidik Poligami
Contoh Borang Soal Selidik PoligamiContoh Borang Soal Selidik Poligami
Contoh Borang Soal Selidik Poligami
 
Software System Engineering - Chapter 13
Software System Engineering - Chapter 13Software System Engineering - Chapter 13
Software System Engineering - Chapter 13
 
Software System Engineering - Chapter 12
Software System Engineering - Chapter 12Software System Engineering - Chapter 12
Software System Engineering - Chapter 12
 
Software System Engineering - Chapter 11
Software System Engineering - Chapter 11Software System Engineering - Chapter 11
Software System Engineering - Chapter 11
 
Software System Engineering - Chapter 10
Software System Engineering - Chapter 10Software System Engineering - Chapter 10
Software System Engineering - Chapter 10
 
Software System Engineering - Chapter 9
Software System Engineering - Chapter 9Software System Engineering - Chapter 9
Software System Engineering - Chapter 9
 
Software System Engineering - Chapter 8
Software System Engineering - Chapter 8Software System Engineering - Chapter 8
Software System Engineering - Chapter 8
 
Software System Engineering - Chapter 7
Software System Engineering - Chapter 7Software System Engineering - Chapter 7
Software System Engineering - Chapter 7
 
Software System Engineering - Chapter 6
Software System Engineering - Chapter 6Software System Engineering - Chapter 6
Software System Engineering - Chapter 6
 
Software System Engineering - Chapter 4
Software System Engineering - Chapter 4Software System Engineering - Chapter 4
Software System Engineering - Chapter 4
 
Software System Engineering - Chapter 3
Software System Engineering - Chapter 3Software System Engineering - Chapter 3
Software System Engineering - Chapter 3
 
Software System Engineering - Chapter 1
Software System Engineering - Chapter 1Software System Engineering - Chapter 1
Software System Engineering - Chapter 1
 
Nota pengajian islam mpw 1143 t12
Nota pengajian islam mpw 1143 t12Nota pengajian islam mpw 1143 t12
Nota pengajian islam mpw 1143 t12
 
Nota pengajian islam mpw 1143 t11
Nota pengajian islam mpw 1143 t11Nota pengajian islam mpw 1143 t11
Nota pengajian islam mpw 1143 t11
 
Nota pengajian islam mpw 1143 t10
Nota pengajian islam mpw 1143 t10Nota pengajian islam mpw 1143 t10
Nota pengajian islam mpw 1143 t10
 

Recently uploaded

MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 

Recently uploaded (20)

MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 

Software System Engineering - Chapter 5

  • 1. 1 CHAPTER 5 What Is Object- Orientation? SOFTWARE SYSTEM ENGINEERING (260CT)
  • 2. In This Lecture You Will Learn: The fundamental concepts of object-orientation The justifications for an object-oriented approach 2
  • 3. 3 Basic Concepts The main concepts introduced here are: • Objects, Classes and Instances • Object State • Generalization and Specialization • Message-passing and Encapsulation • Polymorphism
  • 4. 4 Objects An object is: “an abstraction of something in a problem domain, reflecting the capabilities of the system to • keep information about it, • interact with it, • or both.” Coad and Yourdon (1990)
  • 5. Objects “Objects have state, behaviour and identity.” Booch (1994) State: the condition of an object at any moment, affecting how it can behave Behaviour: what an object can do, how it can respond to events and stimuli Identity: each object is unique 5
  • 6. Identity Behaviour State 6 Examples of Objects Object A person. ‘Hussain Pervez.’ Speak, walk, read. Studying, resting, qualified. A shirt. My favourite button white denim shirt. Shrink, stain, rip. Pressed, dirty, worn. A sale. Sale no #0015, 16/06/02. Earn loyalty points. Invoiced, cancelled. A bottle of ketchup. This bottle of ketchup. Spill in transit. Unsold, opened, empty.
  • 7. Class and Instance All objects are instances of some class Class: “a description of a set of objects with similar • attributes, • operations, • methods • relationships and semantics.” OMG (2001) 7
  • 8. Class and Instance “The purpose of a class is to declare a collection of methods, operations and attributes that fully describe the structure and behaviour of objects.” OMG (2001) Structure: what an object knows, information that it holds Behaviour: what an object can do 8
  • 9. Class and Instance An object is: “an instance that originates from a class, it is structured and behaves according to its class.” OMG (2001) 9
  • 10. Generalization and Specialization Classification is hierarchic in nature For example, a person may be an employee, a customer, a supplier of a service An employee may be paid monthly, weekly or hourly An hourly paid employee may be a driver, a cleaner, a sales assistant 10
  • 11. 11 Specialization Hierarchy Person Employee Customer Supplier monthly paid weekly paid hourly paid Driver Cleaner Sales assistant More general (superclasses) More specialized (subclasses)
  • 12. General (superclass) Specialized (subclass) 12 Generalization and Specialization More general bits of description are abstracted out from specialized classes: Person Name Date of birth Gender Title HourlyPaidDriver StartDate StandardRate OvertimeRate LicenceType
  • 13. Inheritance The whole description of a superclass applies to all its subclasses, including: • Information structure • Behaviour Often known loosely as inheritance (Actually, inheritance is the facility in an O-O language that implements generalization / specialization) 13
  • 14. Message-passing Several objects may collaborate to fulfil each system action “Record CD sale” could involve: • A CD stock item object • A sales transaction object • A sales assistant object These objects communicate by sending each other messages 14
  • 15. 15 Message-passing and Encapsulation Message from another object requests a service. Operation called only via valid operation signature. Data accessed only by object’s own operations. An object’s data is hidden (encapsulated). ‘Layers of an onion’ model of an object: An outer layer of operation signatures… …gives access to middle layer of operations… …which can access inner core of data
  • 16. Polymorphism Polymorphism allows one message to be sent to objects of different classes Sending object need not know what kind of object will receive the message Each receiving object knows how to respond appropriately For example, a ‘resize’ operation in a graphics package 16
  • 17. <<entity>> 17 Polymorphism in Resize Operations <<entity>> Campaign title campaignStartDate campaignFinishDate getCampaignAdverts() addNewAdvert() Campaign title campaignStartDate campaignFinishDate getCampaignAdverts() addNewAdvert()
  • 18. 18 Advantages of O-O Can save effort • Reuse of generalized components cuts work, cost and time Can improve software quality • Encapsulation increases modularity • Sub-systems less coupled to each other • Better translations between analysis and design models and working code
  • 19. Summary In this lecture you have learned about: The fundamental concepts of O-O • Object, class, instance • Generalization and specialization • Message-passing and polymorphism Some of the advantages and justifications of O-O 19

Editor's Notes

  1. Note for lecturers: these slides do not include coverage of how O-O is used in practice. Extra material could be usefully added to show: practical examples of O-O systems facilities of modern O-O languages typical applications and also limitations of O-O.
  2. A useful exercise for the class would be to suggest other behaviours and states for these objects, and to describe: How external events and object behaviour can both result in a change of state How state restricts the possible behaviours of an object
  3. We don’t go into relationships and semantics at all here. Nor do we discuss attributes, operations and methods in any detail. All will be covered more extensively in later material, but lecturers may wish to add more explanation here.
  4. It would be a useful class exercise to: add more detail to other parts of this hierarchy to suggest ways in which the various subclasses differ from each other in behaviour and structure.
  5. I have called this a ‘system action’ because the proper term ‘use case’ may not yet have been introduced. It would probably be useful to add a forward pointer to the lecture where use cases are discussed. A possible exercise would be for the class to discuss and suggest how these objects might participate in the use case, and what operations and attributes are implied by the interaction.
  6. This is the only mention of encapsulation in these slides. It may be worth adding more material and spending a little time explaining the significance of this concept.
  7. The ‘resize’ example will need more explanation than this. What I had in mind was the way that circles, rectangles, bitmaps, groups of objects, etc will all need their own distinct methods to implement the operation. However, from the perspective of a user (or indeed a boundary object) all are called in the same way. The class could be asked to suggest other examples of polymorphism, and to explain what is polymorphic about each.
  8. This slide covers the point only in bare outline. Extra material could usefully be added to show the advantages of and justifications for O-O in more detail.