Top Banner
Object Oriented Processes R.K.Joshi Dept of Computer Science and Engg. IIT Bombay
39

Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Feb 14, 2018

Download

Documents

doliem
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Object Oriented Processes

R.K.JoshiDept of Computer Science and Engg.IIT Bombay

Page 2: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Life Cycle Models

WaterfallSpiralFountainExtremeModel Driven

Page 3: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Phases and their relations with object orientation

requirements modelinganalysis of requirements and the domaindomain modelingdesign of solution spaceimplementationdevelop-test-buildrefactoringdeploying the solution

Page 4: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Requirements modeling

functional requirementscore business logic,business protocols etc.

non-functional requirementsperformance, distribution, security etc.

Page 5: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

OOSE

Transforming requirements into OO implementation applying object orientation in modeling

There is also a process called OOSE, which is use case driven (Jacobson)

Page 6: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

We will look into 3 aspects of OOSE

early requirements

part-whole analysis

CRC

Page 7: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Methods of organization Differentiation of experience into objects

and their attributes Distinction between whole objects and their

parts Formation of classes of objects and

distinction/similarities between the classes [Classification theory] OOA builds upon these three organizational

methods

Page 8: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Primitives for organization

Abstraction Encapsulation Inheritance Association Communication with messages

Page 9: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Major approaches to analysis Functional decomposition

Subfunctions + function interfaces Dataflow Analysis

Data and control flows Data transformations, transformers Data and control stores

Information modeling: Entity Relationships Entities, relations, subtypes, associations

Object Oriented Classes and objects, inheritance, associations,

messages

Page 10: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Coad and Yourdon’s OOA Process

Page 11: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Major activities (Layers) in an OOA process

Finding classes and objects Identifying structures Identifying subjects Defining attributes Defining services

Page 12: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Layer 1: Finding classes and objects

Objects are abstractions in problem domain

Classes describe one or more objects with uniform set of attributes and behavior

Page 13: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Where to look for?

Observe first hand – go to the site of use

Listen to problem domain experts Reuse previous OOA results Reuse results from similar systems Read the requirements document Ask the client for a concise summary

Page 14: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

What to look for? Roles

E.g. supervisor, clerk, student, faculty, manager, account holder, member

Things and Structures in the problem domain E.g. Types of vehicles, types of operators for the system

Devices E.g. sensor, port, modem

Operational procedures E.g. registration, drop a course, pay fees, issue book

Events remembered E.g. successful Registration, update, login session

Places, locations Machine a.b.c.d, branch of a bank

Page 15: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

How to name?

Use Nouns in singular Nouns with adjectives Activity names Standard vocabulary in problem domain

Page 16: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Layer 2: Identifying Structures

What’s structure? Why structure? What to structure?

Objects, activities How to structure?

Inheritance, part-whole, client-server, peer-peer

Page 17: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Layer 3: Identifying Subjects

What are they? e.g. organization, persons, vehicles,

sensors Why? How

select refine construct add

Page 18: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Layer 4: Attribute Layer

what? how?

attributes,instance connections etc. Visibilities

Page 19: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Layer 5: Service Layer

what? req/response, state machines, protocols

Why? How?

Page 20: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

The Part-Whole Relationship (Partalogy Analysis)

Page 21: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Odell’s Classification Criteria

Configuration Whether parts have functional/structural

relationship with the whole Homeomerous

Whether parts are same kind as that of whole

Invariance Whether parts can be separated from

whole

Page 22: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Kinds of Aggregation Relations

Component-Integral Object Material-Object Portion-Object Place-Area Member-Bunch Member-Partnership

Page 23: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Component-Integral Object

Defines configuration of parts within a whole

Wheels part of cart Bristles part of tooth brush Scenes part of film

Page 24: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Material-Object (made of)

Describes invariant configuration of parts within a whole

Car is partly iorn Bread is partly flour Kheer is partly milk

Page 25: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Portion-Object

Defines a homeomeric configuration of parts within whole

Slice of bread Meter part of kilometer

Page 26: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Place-Area

Homeomeric and invariant configuration of parts within a whole

Powai part of Bombay Everest part of Himalayas Boundary line part of cricket field

Page 27: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Member-Bunch

Defines a collection of parts as a whole

Tree is a part of forest Employee is part of forum Ship part of fleet

Page 28: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Member-Partnership

Defines an invariant collection of parts as a whole

Laurel part of laurel and hardy Maruti is a partner in maruti-suzuki

Page 29: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Classification criteria

Member-partnership

Member-bunch

Place-Area

Portion-Object

Material-Object

Component-Object

InvarianthomeromericConfigurational

Page 30: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Classification criteria

yesNoNoMember-partnership

NoNoNoMember-bunch

yesYesYesPlace-Area

noYesYesPortion-Object

noNoYesMaterial-Object

noNoYesComponent-Object

InvarianthomeromericConfigurational

Page 31: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Non-agrregational relations Topological inclusion

Customer is in the store Meeting is in the noon

Classification inclusion Ramayana is a book UML is a modeling notation

Attribution Weight of the box is 50 kg

Attachment Earrings are attached to ears

Ownership Bicyle is owned by subhash

Page 32: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Transitivity in Part-whole A relates to B, B relates to C Does A relate to C?

Car-engine-piston Maths-bob-bob’s arm

If it’s the same kind of relation, transitivity applies.e.g. apply this to compositional objects

- rotate, move, delete

Page 33: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Beck and Cunningham’s CRC Method of Object Identification

Page 34: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

CRC A Method for object oriented thinkingClasses Responsibilities and Collaborators

Class name

Its responsibilities

Its collaborators

Page 35: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

CRC: our recommendation

Class name

Its responsibilities

Its <collaborators – collaborations>

Collaborators are other CRC cards Collaborations will be their responsibilities

Page 36: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

A system decomposed in CRCs

Class name

Its responsibilities

Its collaborators

Class name

Its responsibilities

Its collaborators

Class name

Its responsibilities

Its collaboratorsClass name

Its responsibilities

Its collaboratorsClass name

Its responsibilities

Its collaborators

Page 37: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Contributions of CRC

The authors found that CRC gives a perspective of object-ness in the problem domain

It’s a good technique to teach object decomposition to novices

A card is 4X6 inch size (palmtop)

Page 38: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

Classroom Case study

IIT Lan Acadaemic system for courses, registrations, grades

Page 39: Object Oriented Analysis - CSE, IIT Bombayrkj/talks/ooa.pdf · Phases and their relations with object orientation requirements modeling analysis of requirements and the domain domain

References

Peter Coad/ Edward yourdon: Object-oriented Analysis, Yourdon press computing series, Pearson education, 1991

Kent Beck, Ward Cunningham: A laboratory for object oriented thinking, OOPSLA 1989 conference