SlideShare a Scribd company logo
Identifying Classes and Objects
Object Oriented Analysis
TSRK Prasad
Department of CSE
BITS, Pilani - KK Birla Goa Campus
Object Oriented Programming
Identifying Classes and Objects
Lecture Outline
1 Classical Approaches
2 Structured Analysis
3 Informal English Description
4 Domain Analysis
5 Object Behavioral Analysis
6 CRC Cards
7 Use Case Analysis
2 / 25
Identifying Classes and Objects
Lecture Outline
1 Classical Approaches
2 Structured Analysis
3 Informal English Description
4 Domain Analysis
5 Object Behavioral Analysis
6 CRC Cards
7 Use Case Analysis
3 / 25
Identifying Classes and Objects
Classical Approaches
Derive classes based on ideas of classification.
Classical Approaches 4 / 25
Identifying Classes and Objects
Classical Approaches
Derive classes based on ideas of classification.
Shaler and Mellor:
Tangible things, Roles, Events, Interactions
Classical Approaches 4 / 25
Identifying Classes and Objects
Classical Approaches
Derive classes based on ideas of classification.
Shaler and Mellor:
Tangible things, Roles, Events, Interactions
Ross:
People, Places, Things, Organizations, Concepts, Events
Classical Approaches 4 / 25
Identifying Classes and Objects
Classical Approaches
Derive classes based on ideas of classification.
Shaler and Mellor:
Tangible things, Roles, Events, Interactions
Ross:
People, Places, Things, Organizations, Concepts, Events
Coad and Yourdon:
Structure, Other Systems, Devices, Events Remembered,
Roles Played, Locations, Organizational Units
Classical Approaches 4 / 25
Identifying Classes and Objects
Example
Identify classes for a tourist operator (ex: Paulo Travels) using
classical approaches.
Tangible Things – office, bus, location, garage, seat, waiting
hall, route, trip, . . .
Classical Approaches 5 / 25
Identifying Classes and Objects
Example
Identify classes for a tourist operator (ex: Paulo Travels) using
classical approaches.
Tangible Things – office, bus, location, garage, seat, waiting
hall, route, trip, . . .
Roles – employee, driver, passenger, agent, godown, . . .
Classical Approaches 5 / 25
Identifying Classes and Objects
Example
Identify classes for a tourist operator (ex: Paulo Travels) using
classical approaches.
Tangible Things – office, bus, location, garage, seat, waiting
hall, route, trip, . . .
Roles – employee, driver, passenger, agent, godown, . . .
Events – repair, halt, breakdown, trip start, . . .
Classical Approaches 5 / 25
Identifying Classes and Objects
Example
Identify classes for a tourist operator (ex: Paulo Travels) using
classical approaches.
Tangible Things – office, bus, location, garage, seat, waiting
hall, route, trip, . . .
Roles – employee, driver, passenger, agent, godown, . . .
Events – repair, halt, breakdown, trip start, . . .
Interactions – book ticket, drop passenger, board passenger,
book luggage, . . .
Classical Approaches 5 / 25
Identifying Classes and Objects
Example
Identify classes for a tourist operator (ex: Paulo Travels) using
classical approaches.
Tangible Things – office, bus, location, garage, seat, waiting
hall, route, trip, . . .
Roles – employee, driver, passenger, agent, godown, . . .
Events – repair, halt, breakdown, trip start, . . .
Interactions – book ticket, drop passenger, board passenger,
book luggage, . . .
Organizations – operations unit, franchise, web division, garage,
. . .
Classical Approaches 5 / 25
Identifying Classes and Objects
Example
Identify classes for a tourist operator (ex: Paulo Travels) using
classical approaches.
Tangible Things – office, bus, location, garage, seat, waiting
hall, route, trip, . . .
Roles – employee, driver, passenger, agent, godown, . . .
Events – repair, halt, breakdown, trip start, . . .
Interactions – book ticket, drop passenger, board passenger,
book luggage, . . .
Organizations – operations unit, franchise, web division, garage,
. . .
Locations – city, town, village, bypass, . . .
Classical Approaches 5 / 25
Identifying Classes and Objects
Example
Identify classes for a tourist operator (ex: Paulo Travels) using
classical approaches.
Tangible Things – office, bus, location, garage, seat, waiting
hall, route, trip, . . .
Roles – employee, driver, passenger, agent, godown, . . .
Events – repair, halt, breakdown, trip start, . . .
Interactions – book ticket, drop passenger, board passenger,
book luggage, . . .
Organizations – operations unit, franchise, web division, garage,
. . .
Locations – city, town, village, bypass, . . .
Other Systems – toll gates, revenue department, bus dealers,
. . .
Classical Approaches 5 / 25
Identifying Classes and Objects
Lecture Outline
1 Classical Approaches
2 Structured Analysis
3 Informal English Description
4 Domain Analysis
5 Object Behavioral Analysis
6 CRC Cards
7 Use Case Analysis
Structured Analysis 6 / 25
Identifying Classes and Objects
Structured Analysis
Idea: Use structural analysis as front-end to Object-oriented
design
Structured Analysis 7 / 25
Identifying Classes and Objects
Structured Analysis
Idea: Use structural analysis as front-end to Object-oriented
design
Obtain candidate objects from:
External entities, data stores, control stores, control
transformations
Structured Analysis 7 / 25
Identifying Classes and Objects
Structured Analysis
Idea: Use structural analysis as front-end to Object-oriented
design
Obtain candidate objects from:
External entities, data stores, control stores, control
transformations
Obtain candidate classes from:
data flows, control flows
Structured Analysis 7 / 25
Identifying Classes and Objects
Structured Analysis
Idea: Use structural analysis as front-end to Object-oriented
design
Obtain candidate objects from:
External entities, data stores, control stores, control
transformations
Obtain candidate classes from:
data flows, control flows
Not recommended approach
Structured Analysis 7 / 25
Identifying Classes and Objects
Data Flow and Control Flow Diagrams
Data Flow Diagram:
Structured Analysis 8 / 25
Identifying Classes and Objects
Data Flow and Control Flow Diagrams
Data Flow Diagram:
Control Flow Diagram:
Structured Analysis 8 / 25
Identifying Classes and Objects
Lecture Outline
1 Classical Approaches
2 Structured Analysis
3 Informal English Description
4 Domain Analysis
5 Object Behavioral Analysis
6 CRC Cards
7 Use Case Analysis
Informal English Description 9 / 25
Identifying Classes and Objects
Informal English Description
nouns ÝÑ objects
Informal English Description 10 / 25
Identifying Classes and Objects
Informal English Description
nouns ÝÑ objects
verbs ÝÑ operations
Informal English Description 10 / 25
Identifying Classes and Objects
Informal English Description
nouns ÝÑ objects
verbs ÝÑ operations
Problem? Nouns can be verbed, verbs can be nouned.
Informal English Description 10 / 25
Identifying Classes and Objects
Example on Informal English Description
... If a customer enters a store with the intention of buying a toy
for a child, then advice must be available within a reasonable
time concerning the suitability of the toy for the child. This will
depend on the age range of the child and the attributes of the
toy. If the toy is a dangerous item, then it is unsuitable. ...
Informal English Description 11 / 25
Identifying Classes and Objects
Example on Informal English Description
... If a customer enters a store with the intention of buying a toy
for a child, then advice must be available within a reasonable
time concerning the suitability of the toy for the child. This will
depend on the age range of the child and the attributes of the
toy. If the toy is a dangerous item, then it is unsuitable. ...
Ans:
... If a customer enters a store with the intention of buying a toy
for a child, then advice must be available within a reasonable
time concerning the suitability of the toy for the child. This will
depend on the age range of the child and the attributes of the
toy. If the toy is a dangerous item, then it is unsuitable. ...
Notation: class operation attributes/associations
Informal English Description 11 / 25
Identifying Classes and Objects
On Thinking/Communication
12 / 25
Identifying Classes and Objects
Lecture Outline
1 Classical Approaches
2 Structured Analysis
3 Informal English Description
4 Domain Analysis
5 Object Behavioral Analysis
6 CRC Cards
7 Use Case Analysis
Domain Analysis 13 / 25
Identifying Classes and Objects
Domain Analysis
Idea: Identify classes and objects that are common to all
applications with in a given domain.
Domain Analysis 14 / 25
Identifying Classes and Objects
Domain Analysis
Idea: Identify classes and objects that are common to all
applications with in a given domain.
Moore and Bailin Approach:
1 Construct strawman model of domain
Domain Analysis 14 / 25
Identifying Classes and Objects
Domain Analysis
Idea: Identify classes and objects that are common to all
applications with in a given domain.
Moore and Bailin Approach:
1 Construct strawman model of domain
2 Construct/collect models of existing softwares serving the
domain
Domain Analysis 14 / 25
Identifying Classes and Objects
Domain Analysis
Idea: Identify classes and objects that are common to all
applications with in a given domain.
Moore and Bailin Approach:
1 Construct strawman model of domain
2 Construct/collect models of existing softwares serving the
domain
3 Reconcile the differences
Domain Analysis 14 / 25
Identifying Classes and Objects
Domain Analysis
Idea: Identify classes and objects that are common to all
applications with in a given domain.
Moore and Bailin Approach:
1 Construct strawman model of domain
2 Construct/collect models of existing softwares serving the
domain
3 Reconcile the differences
4 Refine strawman model to accommodate existing models
Domain Analysis 14 / 25
Identifying Classes and Objects
Example on Domain Analysis
Hospital Domain
Domain Analysis 15 / 25
Identifying Classes and Objects
Lecture Outline
1 Classical Approaches
2 Structured Analysis
3 Informal English Description
4 Domain Analysis
5 Object Behavioral Analysis
6 CRC Cards
7 Use Case Analysis
Object Behavioral Analysis 16 / 25
Identifying Classes and Objects
Object Behavioral Analysis (OBA)
Idea: Form classes based on groups of objects that exhibit
similar behavior.
Object Behavioral Analysis 17 / 25
Identifying Classes and Objects
Object Behavioral Analysis (OBA)
Idea: Form classes based on groups of objects that exhibit
similar behavior.
Two suggestions:
1 Responsibility identification
Responsibility - service provided by object(s) for all
contracts it supports.
Object Behavioral Analysis 17 / 25
Identifying Classes and Objects
Object Behavioral Analysis (OBA)
Idea: Form classes based on groups of objects that exhibit
similar behavior.
Two suggestions:
1 Responsibility identification
Responsibility - service provided by object(s) for all
contracts it supports.
2 Behavior allocation
1 Assign system behavior to parts of the system.
2 Initiators of / participants in behaviors are objects
Object Behavioral Analysis 17 / 25
Identifying Classes and Objects
Object Behavior Analysis (OBA) Exercise
Identify objects and behaviors in a regular OOP lab of this
course.
Object Behavioral Analysis 18 / 25
Identifying Classes and Objects
Lecture Outline
1 Classical Approaches
2 Structured Analysis
3 Informal English Description
4 Domain Analysis
5 Object Behavioral Analysis
6 CRC Cards
7 Use Case Analysis
CRC Cards 19 / 25
Identifying Classes and Objects
CRC Cards
CRC stands for Class/Responsibilities/Collaborators
CRC Card Format
CRC Cards 20 / 25
Identifying Classes and Objects
CRC Cards
CRC stands for Class/Responsibilities/Collaborators
CRC Card Format
CRC Card for Student Class
CRC Cards 20 / 25
Identifying Classes and Objects
CRC Card Layout
cards can be arranged as class/object hierarchy
CRC Cards 21 / 25
Identifying Classes and Objects
Lecture Outline
1 Classical Approaches
2 Structured Analysis
3 Informal English Description
4 Domain Analysis
5 Object Behavioral Analysis
6 CRC Cards
7 Use Case Analysis
Use Case Analysis 22 / 25
Identifying Classes and Objects
Use Case Analysis
A behaviourally related sequence of transactions
performed by an actor in a dialogue with the system to
provide some measurable value to the actor.
–Jacobson et. al.
Use Case Analysis 23 / 25
Identifying Classes and Objects
Use Case Analysis
A behaviourally related sequence of transactions
performed by an actor in a dialogue with the system to
provide some measurable value to the actor.
–Jacobson et. al.
Approach: In each use case,
1 Identify the participating objects (Classes)
Use Case Analysis 23 / 25
Identifying Classes and Objects
Use Case Analysis
A behaviourally related sequence of transactions
performed by an actor in a dialogue with the system to
provide some measurable value to the actor.
–Jacobson et. al.
Approach: In each use case,
1 Identify the participating objects (Classes)
2 Identify the responsibilities of each object (Responsibilities)
Use Case Analysis 23 / 25
Identifying Classes and Objects
Use Case Analysis
A behaviourally related sequence of transactions
performed by an actor in a dialogue with the system to
provide some measurable value to the actor.
–Jacobson et. al.
Approach: In each use case,
1 Identify the participating objects (Classes)
2 Identify the responsibilities of each object (Responsibilities)
3 Identify the collaborations / relations between objects
(Collaborators)
Use Case Analysis 23 / 25
Identifying Classes and Objects
Use Case Analysis
A behaviourally related sequence of transactions
performed by an actor in a dialogue with the system to
provide some measurable value to the actor.
–Jacobson et. al.
Approach: In each use case,
1 Identify the participating objects (Classes)
2 Identify the responsibilities of each object (Responsibilities)
3 Identify the collaborations / relations between objects
(Collaborators)
Use case analysis serves as basis of system tests.
Use Case Analysis 23 / 25
Identifying Classes and Objects
Fair Comparison
24 / 25
Identifying Classes and Objects
Acknowledgements
CRC diagrams http://agilemodeling.com/artifacts/crcModel.htm
domain-analysis.jpg http://www.cs.sjsu.edu/faculty/pearce/pop/chp1/chapter1_files/image008.gif
assessment.png http://www.behaviorbabe.com/assessments.htm
DFDExample.png http://upload.wikimedia.org/wikipedia/commons/c/c8/DataFlowDiagram_Example.png
CFDExample.png http://upload.wikimedia.org/wikipedia/commons/e/e3/Performance_seeking_control_flow_diagram.jpg
controlFlow.png http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00120.1653/
doc/html/rad1232636366142.html
25 / 25

More Related Content

More from BalasundaramSr

WEB 3 IS THE FILE UPLOADED IN THIS APPROACH
WEB 3 IS THE FILE UPLOADED IN THIS APPROACHWEB 3 IS THE FILE UPLOADED IN THIS APPROACH
WEB 3 IS THE FILE UPLOADED IN THIS APPROACH
BalasundaramSr
 
Semantic Search to Web 3.0 Complete Tutorial
Semantic Search to Web 3.0 Complete TutorialSemantic Search to Web 3.0 Complete Tutorial
Semantic Search to Web 3.0 Complete Tutorial
BalasundaramSr
 
Objects and Classes BRIEF.pptx
Objects and Classes BRIEF.pptxObjects and Classes BRIEF.pptx
Objects and Classes BRIEF.pptx
BalasundaramSr
 
SocialCom09-tutorial.pdf
SocialCom09-tutorial.pdfSocialCom09-tutorial.pdf
SocialCom09-tutorial.pdf
BalasundaramSr
 
13047926.ppt
13047926.ppt13047926.ppt
13047926.ppt
BalasundaramSr
 
OSNs.pptx
OSNs.pptxOSNs.pptx
OSNs.pptx
BalasundaramSr
 
HadoopIntroduction.pptx
HadoopIntroduction.pptxHadoopIntroduction.pptx
HadoopIntroduction.pptx
BalasundaramSr
 
HadoopIntroduction.pptx
HadoopIntroduction.pptxHadoopIntroduction.pptx
HadoopIntroduction.pptx
BalasundaramSr
 
Data Mart Lake Ware.pptx
Data Mart Lake Ware.pptxData Mart Lake Ware.pptx
Data Mart Lake Ware.pptx
BalasundaramSr
 
Simple SNA.pdf
Simple SNA.pdfSimple SNA.pdf
Simple SNA.pdf
BalasundaramSr
 
XPATH_XSLT-1.pptx
XPATH_XSLT-1.pptxXPATH_XSLT-1.pptx
XPATH_XSLT-1.pptx
BalasundaramSr
 
Cognitive Science.ppt
Cognitive Science.pptCognitive Science.ppt
Cognitive Science.ppt
BalasundaramSr
 
Web Page Design.ppt
Web Page Design.pptWeb Page Design.ppt
Web Page Design.ppt
BalasundaramSr
 
wipo_res_dev_ge_09_www_130165.ppt
wipo_res_dev_ge_09_www_130165.pptwipo_res_dev_ge_09_www_130165.ppt
wipo_res_dev_ge_09_www_130165.ppt
BalasundaramSr
 
OODIAGRAMS.ppt
OODIAGRAMS.pptOODIAGRAMS.ppt
OODIAGRAMS.ppt
BalasundaramSr
 
Threading.pptx
Threading.pptxThreading.pptx
Threading.pptx
BalasundaramSr
 
OMTanalysis.ppt
OMTanalysis.pptOMTanalysis.ppt
OMTanalysis.ppt
BalasundaramSr
 
network.ppt
network.pptnetwork.ppt
network.ppt
BalasundaramSr
 

More from BalasundaramSr (20)

WEB 3 IS THE FILE UPLOADED IN THIS APPROACH
WEB 3 IS THE FILE UPLOADED IN THIS APPROACHWEB 3 IS THE FILE UPLOADED IN THIS APPROACH
WEB 3 IS THE FILE UPLOADED IN THIS APPROACH
 
Semantic Search to Web 3.0 Complete Tutorial
Semantic Search to Web 3.0 Complete TutorialSemantic Search to Web 3.0 Complete Tutorial
Semantic Search to Web 3.0 Complete Tutorial
 
Objects and Classes BRIEF.pptx
Objects and Classes BRIEF.pptxObjects and Classes BRIEF.pptx
Objects and Classes BRIEF.pptx
 
SocialCom09-tutorial.pdf
SocialCom09-tutorial.pdfSocialCom09-tutorial.pdf
SocialCom09-tutorial.pdf
 
13047926.ppt
13047926.ppt13047926.ppt
13047926.ppt
 
Xpath.pdf
Xpath.pdfXpath.pdf
Xpath.pdf
 
OSNs.pptx
OSNs.pptxOSNs.pptx
OSNs.pptx
 
HadoopIntroduction.pptx
HadoopIntroduction.pptxHadoopIntroduction.pptx
HadoopIntroduction.pptx
 
HadoopIntroduction.pptx
HadoopIntroduction.pptxHadoopIntroduction.pptx
HadoopIntroduction.pptx
 
Data Mart Lake Ware.pptx
Data Mart Lake Ware.pptxData Mart Lake Ware.pptx
Data Mart Lake Ware.pptx
 
Simple SNA.pdf
Simple SNA.pdfSimple SNA.pdf
Simple SNA.pdf
 
XPATH_XSLT-1.pptx
XPATH_XSLT-1.pptxXPATH_XSLT-1.pptx
XPATH_XSLT-1.pptx
 
Cognitive Science.ppt
Cognitive Science.pptCognitive Science.ppt
Cognitive Science.ppt
 
Web Page Design.ppt
Web Page Design.pptWeb Page Design.ppt
Web Page Design.ppt
 
wipo_res_dev_ge_09_www_130165.ppt
wipo_res_dev_ge_09_www_130165.pptwipo_res_dev_ge_09_www_130165.ppt
wipo_res_dev_ge_09_www_130165.ppt
 
OODIAGRAMS.ppt
OODIAGRAMS.pptOODIAGRAMS.ppt
OODIAGRAMS.ppt
 
Threading.pptx
Threading.pptxThreading.pptx
Threading.pptx
 
OMTanalysis.ppt
OMTanalysis.pptOMTanalysis.ppt
OMTanalysis.ppt
 
network.ppt
network.pptnetwork.ppt
network.ppt
 
css1.ppt
css1.pptcss1.ppt
css1.ppt
 

Recently uploaded

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
 
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
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
PrashantGoswami42
 
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
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
Kamal Acharya
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
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
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
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
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 

Recently uploaded (20)

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...
 
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
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
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
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
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...
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 

OOA Analysis(1).pdf

  • 1. Identifying Classes and Objects Object Oriented Analysis TSRK Prasad Department of CSE BITS, Pilani - KK Birla Goa Campus Object Oriented Programming
  • 2. Identifying Classes and Objects Lecture Outline 1 Classical Approaches 2 Structured Analysis 3 Informal English Description 4 Domain Analysis 5 Object Behavioral Analysis 6 CRC Cards 7 Use Case Analysis 2 / 25
  • 3. Identifying Classes and Objects Lecture Outline 1 Classical Approaches 2 Structured Analysis 3 Informal English Description 4 Domain Analysis 5 Object Behavioral Analysis 6 CRC Cards 7 Use Case Analysis 3 / 25
  • 4. Identifying Classes and Objects Classical Approaches Derive classes based on ideas of classification. Classical Approaches 4 / 25
  • 5. Identifying Classes and Objects Classical Approaches Derive classes based on ideas of classification. Shaler and Mellor: Tangible things, Roles, Events, Interactions Classical Approaches 4 / 25
  • 6. Identifying Classes and Objects Classical Approaches Derive classes based on ideas of classification. Shaler and Mellor: Tangible things, Roles, Events, Interactions Ross: People, Places, Things, Organizations, Concepts, Events Classical Approaches 4 / 25
  • 7. Identifying Classes and Objects Classical Approaches Derive classes based on ideas of classification. Shaler and Mellor: Tangible things, Roles, Events, Interactions Ross: People, Places, Things, Organizations, Concepts, Events Coad and Yourdon: Structure, Other Systems, Devices, Events Remembered, Roles Played, Locations, Organizational Units Classical Approaches 4 / 25
  • 8. Identifying Classes and Objects Example Identify classes for a tourist operator (ex: Paulo Travels) using classical approaches. Tangible Things – office, bus, location, garage, seat, waiting hall, route, trip, . . . Classical Approaches 5 / 25
  • 9. Identifying Classes and Objects Example Identify classes for a tourist operator (ex: Paulo Travels) using classical approaches. Tangible Things – office, bus, location, garage, seat, waiting hall, route, trip, . . . Roles – employee, driver, passenger, agent, godown, . . . Classical Approaches 5 / 25
  • 10. Identifying Classes and Objects Example Identify classes for a tourist operator (ex: Paulo Travels) using classical approaches. Tangible Things – office, bus, location, garage, seat, waiting hall, route, trip, . . . Roles – employee, driver, passenger, agent, godown, . . . Events – repair, halt, breakdown, trip start, . . . Classical Approaches 5 / 25
  • 11. Identifying Classes and Objects Example Identify classes for a tourist operator (ex: Paulo Travels) using classical approaches. Tangible Things – office, bus, location, garage, seat, waiting hall, route, trip, . . . Roles – employee, driver, passenger, agent, godown, . . . Events – repair, halt, breakdown, trip start, . . . Interactions – book ticket, drop passenger, board passenger, book luggage, . . . Classical Approaches 5 / 25
  • 12. Identifying Classes and Objects Example Identify classes for a tourist operator (ex: Paulo Travels) using classical approaches. Tangible Things – office, bus, location, garage, seat, waiting hall, route, trip, . . . Roles – employee, driver, passenger, agent, godown, . . . Events – repair, halt, breakdown, trip start, . . . Interactions – book ticket, drop passenger, board passenger, book luggage, . . . Organizations – operations unit, franchise, web division, garage, . . . Classical Approaches 5 / 25
  • 13. Identifying Classes and Objects Example Identify classes for a tourist operator (ex: Paulo Travels) using classical approaches. Tangible Things – office, bus, location, garage, seat, waiting hall, route, trip, . . . Roles – employee, driver, passenger, agent, godown, . . . Events – repair, halt, breakdown, trip start, . . . Interactions – book ticket, drop passenger, board passenger, book luggage, . . . Organizations – operations unit, franchise, web division, garage, . . . Locations – city, town, village, bypass, . . . Classical Approaches 5 / 25
  • 14. Identifying Classes and Objects Example Identify classes for a tourist operator (ex: Paulo Travels) using classical approaches. Tangible Things – office, bus, location, garage, seat, waiting hall, route, trip, . . . Roles – employee, driver, passenger, agent, godown, . . . Events – repair, halt, breakdown, trip start, . . . Interactions – book ticket, drop passenger, board passenger, book luggage, . . . Organizations – operations unit, franchise, web division, garage, . . . Locations – city, town, village, bypass, . . . Other Systems – toll gates, revenue department, bus dealers, . . . Classical Approaches 5 / 25
  • 15. Identifying Classes and Objects Lecture Outline 1 Classical Approaches 2 Structured Analysis 3 Informal English Description 4 Domain Analysis 5 Object Behavioral Analysis 6 CRC Cards 7 Use Case Analysis Structured Analysis 6 / 25
  • 16. Identifying Classes and Objects Structured Analysis Idea: Use structural analysis as front-end to Object-oriented design Structured Analysis 7 / 25
  • 17. Identifying Classes and Objects Structured Analysis Idea: Use structural analysis as front-end to Object-oriented design Obtain candidate objects from: External entities, data stores, control stores, control transformations Structured Analysis 7 / 25
  • 18. Identifying Classes and Objects Structured Analysis Idea: Use structural analysis as front-end to Object-oriented design Obtain candidate objects from: External entities, data stores, control stores, control transformations Obtain candidate classes from: data flows, control flows Structured Analysis 7 / 25
  • 19. Identifying Classes and Objects Structured Analysis Idea: Use structural analysis as front-end to Object-oriented design Obtain candidate objects from: External entities, data stores, control stores, control transformations Obtain candidate classes from: data flows, control flows Not recommended approach Structured Analysis 7 / 25
  • 20. Identifying Classes and Objects Data Flow and Control Flow Diagrams Data Flow Diagram: Structured Analysis 8 / 25
  • 21. Identifying Classes and Objects Data Flow and Control Flow Diagrams Data Flow Diagram: Control Flow Diagram: Structured Analysis 8 / 25
  • 22. Identifying Classes and Objects Lecture Outline 1 Classical Approaches 2 Structured Analysis 3 Informal English Description 4 Domain Analysis 5 Object Behavioral Analysis 6 CRC Cards 7 Use Case Analysis Informal English Description 9 / 25
  • 23. Identifying Classes and Objects Informal English Description nouns ÝÑ objects Informal English Description 10 / 25
  • 24. Identifying Classes and Objects Informal English Description nouns ÝÑ objects verbs ÝÑ operations Informal English Description 10 / 25
  • 25. Identifying Classes and Objects Informal English Description nouns ÝÑ objects verbs ÝÑ operations Problem? Nouns can be verbed, verbs can be nouned. Informal English Description 10 / 25
  • 26. Identifying Classes and Objects Example on Informal English Description ... If a customer enters a store with the intention of buying a toy for a child, then advice must be available within a reasonable time concerning the suitability of the toy for the child. This will depend on the age range of the child and the attributes of the toy. If the toy is a dangerous item, then it is unsuitable. ... Informal English Description 11 / 25
  • 27. Identifying Classes and Objects Example on Informal English Description ... If a customer enters a store with the intention of buying a toy for a child, then advice must be available within a reasonable time concerning the suitability of the toy for the child. This will depend on the age range of the child and the attributes of the toy. If the toy is a dangerous item, then it is unsuitable. ... Ans: ... If a customer enters a store with the intention of buying a toy for a child, then advice must be available within a reasonable time concerning the suitability of the toy for the child. This will depend on the age range of the child and the attributes of the toy. If the toy is a dangerous item, then it is unsuitable. ... Notation: class operation attributes/associations Informal English Description 11 / 25
  • 28. Identifying Classes and Objects On Thinking/Communication 12 / 25
  • 29. Identifying Classes and Objects Lecture Outline 1 Classical Approaches 2 Structured Analysis 3 Informal English Description 4 Domain Analysis 5 Object Behavioral Analysis 6 CRC Cards 7 Use Case Analysis Domain Analysis 13 / 25
  • 30. Identifying Classes and Objects Domain Analysis Idea: Identify classes and objects that are common to all applications with in a given domain. Domain Analysis 14 / 25
  • 31. Identifying Classes and Objects Domain Analysis Idea: Identify classes and objects that are common to all applications with in a given domain. Moore and Bailin Approach: 1 Construct strawman model of domain Domain Analysis 14 / 25
  • 32. Identifying Classes and Objects Domain Analysis Idea: Identify classes and objects that are common to all applications with in a given domain. Moore and Bailin Approach: 1 Construct strawman model of domain 2 Construct/collect models of existing softwares serving the domain Domain Analysis 14 / 25
  • 33. Identifying Classes and Objects Domain Analysis Idea: Identify classes and objects that are common to all applications with in a given domain. Moore and Bailin Approach: 1 Construct strawman model of domain 2 Construct/collect models of existing softwares serving the domain 3 Reconcile the differences Domain Analysis 14 / 25
  • 34. Identifying Classes and Objects Domain Analysis Idea: Identify classes and objects that are common to all applications with in a given domain. Moore and Bailin Approach: 1 Construct strawman model of domain 2 Construct/collect models of existing softwares serving the domain 3 Reconcile the differences 4 Refine strawman model to accommodate existing models Domain Analysis 14 / 25
  • 35. Identifying Classes and Objects Example on Domain Analysis Hospital Domain Domain Analysis 15 / 25
  • 36. Identifying Classes and Objects Lecture Outline 1 Classical Approaches 2 Structured Analysis 3 Informal English Description 4 Domain Analysis 5 Object Behavioral Analysis 6 CRC Cards 7 Use Case Analysis Object Behavioral Analysis 16 / 25
  • 37. Identifying Classes and Objects Object Behavioral Analysis (OBA) Idea: Form classes based on groups of objects that exhibit similar behavior. Object Behavioral Analysis 17 / 25
  • 38. Identifying Classes and Objects Object Behavioral Analysis (OBA) Idea: Form classes based on groups of objects that exhibit similar behavior. Two suggestions: 1 Responsibility identification Responsibility - service provided by object(s) for all contracts it supports. Object Behavioral Analysis 17 / 25
  • 39. Identifying Classes and Objects Object Behavioral Analysis (OBA) Idea: Form classes based on groups of objects that exhibit similar behavior. Two suggestions: 1 Responsibility identification Responsibility - service provided by object(s) for all contracts it supports. 2 Behavior allocation 1 Assign system behavior to parts of the system. 2 Initiators of / participants in behaviors are objects Object Behavioral Analysis 17 / 25
  • 40. Identifying Classes and Objects Object Behavior Analysis (OBA) Exercise Identify objects and behaviors in a regular OOP lab of this course. Object Behavioral Analysis 18 / 25
  • 41. Identifying Classes and Objects Lecture Outline 1 Classical Approaches 2 Structured Analysis 3 Informal English Description 4 Domain Analysis 5 Object Behavioral Analysis 6 CRC Cards 7 Use Case Analysis CRC Cards 19 / 25
  • 42. Identifying Classes and Objects CRC Cards CRC stands for Class/Responsibilities/Collaborators CRC Card Format CRC Cards 20 / 25
  • 43. Identifying Classes and Objects CRC Cards CRC stands for Class/Responsibilities/Collaborators CRC Card Format CRC Card for Student Class CRC Cards 20 / 25
  • 44. Identifying Classes and Objects CRC Card Layout cards can be arranged as class/object hierarchy CRC Cards 21 / 25
  • 45. Identifying Classes and Objects Lecture Outline 1 Classical Approaches 2 Structured Analysis 3 Informal English Description 4 Domain Analysis 5 Object Behavioral Analysis 6 CRC Cards 7 Use Case Analysis Use Case Analysis 22 / 25
  • 46. Identifying Classes and Objects Use Case Analysis A behaviourally related sequence of transactions performed by an actor in a dialogue with the system to provide some measurable value to the actor. –Jacobson et. al. Use Case Analysis 23 / 25
  • 47. Identifying Classes and Objects Use Case Analysis A behaviourally related sequence of transactions performed by an actor in a dialogue with the system to provide some measurable value to the actor. –Jacobson et. al. Approach: In each use case, 1 Identify the participating objects (Classes) Use Case Analysis 23 / 25
  • 48. Identifying Classes and Objects Use Case Analysis A behaviourally related sequence of transactions performed by an actor in a dialogue with the system to provide some measurable value to the actor. –Jacobson et. al. Approach: In each use case, 1 Identify the participating objects (Classes) 2 Identify the responsibilities of each object (Responsibilities) Use Case Analysis 23 / 25
  • 49. Identifying Classes and Objects Use Case Analysis A behaviourally related sequence of transactions performed by an actor in a dialogue with the system to provide some measurable value to the actor. –Jacobson et. al. Approach: In each use case, 1 Identify the participating objects (Classes) 2 Identify the responsibilities of each object (Responsibilities) 3 Identify the collaborations / relations between objects (Collaborators) Use Case Analysis 23 / 25
  • 50. Identifying Classes and Objects Use Case Analysis A behaviourally related sequence of transactions performed by an actor in a dialogue with the system to provide some measurable value to the actor. –Jacobson et. al. Approach: In each use case, 1 Identify the participating objects (Classes) 2 Identify the responsibilities of each object (Responsibilities) 3 Identify the collaborations / relations between objects (Collaborators) Use case analysis serves as basis of system tests. Use Case Analysis 23 / 25
  • 51. Identifying Classes and Objects Fair Comparison 24 / 25
  • 52. Identifying Classes and Objects Acknowledgements CRC diagrams http://agilemodeling.com/artifacts/crcModel.htm domain-analysis.jpg http://www.cs.sjsu.edu/faculty/pearce/pop/chp1/chapter1_files/image008.gif assessment.png http://www.behaviorbabe.com/assessments.htm DFDExample.png http://upload.wikimedia.org/wikipedia/commons/c/c8/DataFlowDiagram_Example.png CFDExample.png http://upload.wikimedia.org/wikipedia/commons/e/e3/Performance_seeking_control_flow_diagram.jpg controlFlow.png http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00120.1653/ doc/html/rad1232636366142.html 25 / 25