object-oriented analysis and design methodologyobject-oriented analysis and design object-oriented...
Post on 18-Aug-2020
27 Views
Preview:
TRANSCRIPT
Object-Oriented Analysis and Design Methodology
Romi Satria WahonoEmail : romi@romisatriawahono.netHP : http://romisatriawahono.netDepartment of Information and Computer SciencesGraduate School of Science and EngineeringSaitama University
1
ContentsAn Introduction to the Object-OrientationAn Introduction to the Object-Oriented MethodologyObject-Oriented Notation GuideObject-Oriented Analysis and DesignObject-Oriented Implementation
2
An Introduction to the Object-Orientation
3
What is Object-Orientation
A new technology based on objects and classesA way of thingking to organizing software as a collection of discrete objects that incorporate both data structure and behaviourAn abstraction of the real world based on objects and their interactions with other objects
4
Three Characteristics of OO
Abstraction and Classification : Focusing on essential, inherent aspects of an entity and ignoring its accidental. The idea of grouping software ideas into classes of things
Encapsulation and Information Hiding : Separating the external aspects of an object, which are accessible to other objects, from the internal implementation details of object, which are hidden from other objects
Polymorphism and Inheritance :
Abstraction and Classification : Focusing on essential, inherent aspects of an entity and ignoring its accidental. The idea of grouping software ideas into classes of things
Encapsulation and Information Hiding : Separating the external aspects of an object, which are accessible to other objects, from the internal implementation details of object, which are hidden from other objects
Polymorphism and Inheritance :
Object-Oriented System
Object-Oriented System
AbstractionAbstractionAbility of abstractions to share properties by inheritance hierarchy
Ability of abstractions to share properties by inheritance hierarchy
PolymorphismPolymorphismEncapsulationEncapsulation 5
Object and Classes
Object An object is a thing or concept. It can be a real-world thing or concept, or an abstraction of a thing or concept expressed as a software representation.An object has state (attributes) and behavior (method) Individual objects, also called instances, have identity and aredistinct things, and can be distinguished from other objects.
Classes A class is a description of a collection of objects with common attributes and behavior. In practice, the definition or specification of a class includes the definitions of the attributes comprising the state, the methods implementing the behavior, and how to handle creation and destruction of an object.
Object An object is a thing or concept. It can be a real-world thing or concept, or an abstraction of a thing or concept expressed as a software representation.An object has state (attributes) and behavior (method) Individual objects, also called instances, have identity and aredistinct things, and can be distinguished from other objects.
Classes A class is a description of a collection of objects with common attributes and behavior. In practice, the definition or specification of a class includes the definitions of the attributes comprising the state, the methods implementing the behavior, and how to handle creation and destruction of an object.
6
An Introduction to the Object-Oriented Methodology
7
What Are Analysis and Design For
Testing a physical entity before building systemCommunicating with CustomersVisualizationReduction of Complexity
8
Various Type of Methodologies
Shlaer/Mellor Method [Shlaer-1988]Coad/Yourdon Method [Coad-1991]Booch Method [Booch-1991]OMT Method [Rumbaugh-1991]Wirfs-Brock Method [Wirfs-Brock-1990]OOSE Objectory Method [Jacobson-1992]UML (Unified Modeling Language) [UML-1997]
9
Development Process
Object-Oriented Analysis
Object-Oriented Design
Object-Oriented Implementation
10
Object-Oriented Notation Guide
11
Class and ObjectClass Object Instances
Class Name
Attribute
Operation
Class Name
Attribute
Operation
Instantiation RelationshipInstantiation Relationship
Class NameClass Name12
Generalization and Inheritance
Superclass
Subclass 1 Subclass 2
13
AggregationAggregation 1 Aggregation 2
Assembly Class Assembly Class
Part 1 Class Part 2 Class Part 1 Class Part 2 Class
14
AssociationAssociation
Association NameClass 1 Class 2
Role 1 Role 2
Qualified AssociationAssociation Name
Class 1 Class 2qualifierRole 1 Role 2
Multiplicity of AssociationsMultiplicity of Associations
Class Class Class 1+
One or MoreExactly One Many 15
Ternary Association
Association Name
Class 1 Class 2Role 1 Role 2
Role 3
Class 3
16
Object-Oriented Analysis and Design
17
Analysis and Design ProcessProblem StatementSystem ArchitectureObject Modeling
Identifying Object ClassesPreparing a Data Dictionary for ClassesIdentifying AssociationsIdentifying AttributesRefining with InheritanceGrouping Classes into Modules
Dynamic ModelingFunctional Modeling
Problem StatementSystem ArchitectureObject Modeling
Identifying Object ClassesPreparing a Data Dictionary for ClassesIdentifying AssociationsIdentifying AttributesRefining with InheritanceGrouping Classes into Modules
Dynamic ModelingFunctional Modeling
18
Problem Statement
Requirements StatementProblem ScopeWhat is neededApplication ContextAssumptionsPerformance Needs
19
Example : ATM Network
CashierStation
20
ATM
ATM
ATM
CentralComputer
BankComputer
BankComputer
Account
Account
Account
Account
System Architecture
ATM
Consortium Computer
Bank Computer
CashCard
Transaction
Consortium
Cashier
CashierStation
Account
Customer
CardAuthorization
Database
Transaction Transaction
User Interface
StationCode
Bank Code
ATM Station
PhoneLines
PhoneLinesUser
21
Identifying Object Classes
22
Extract nouns Eliminate spuriousClasses
Requirements
Statement
Object
Classes
Tentative
Object Classes
Redundant classesIrrelevant classesVague classesAttributesOperationsRolesImplementation constructs
Discard Unnecessary and Incorrect Classes
Discard Unnecessary and Incorrect Classes
Example: IOC for ATM NetworkBad Classes
CostUser
AccessTransaction
Log
SoftwareCommLine
ReceiptTransaction
Data
CashAccount
Data
SystemSecurityProvision
Record KeepingProvision
Banking Network
Vague Attribute Implementation
Redundant Irrelevant
Good Classes
Account ATM Bank Consortium Customer CashierCashierStation
CentralComputer
BankComputer Cash Card Transaction
23
Preparing a Data Dictionary
Isolated word have many interpretations, so prepare a data dictionary for all modeling entitiesDescribe the scope of the class within the current problem, including assumptions or restrictions on its membership or useThe data dictionary also describes associations, attributes, and operation
Isolated word have many interpretations, so prepare a data dictionary for all modeling entitiesDescribe the scope of the class within the current problem, including assumptions or restrictions on its membership or useThe data dictionary also describes associations, attributes, and operation
24
Example: DD for ATM NetworkAccount : a single account in a bank against which transactions can be applied. Account may be of various types, at least checking or savings. A customer can hold more than one account.Bank : A financial institution that holds accounts for customers and that issues cash cards authorizing access to accounts over the ATM network.ATM : …Bank Computer : …Cash Card : …Cashier : ...etc.
Account : a single account in a bank against which transactions can be applied. Account may be of various types, at least checking or savings. A customer can hold more than one account.Bank : A financial institution that holds accounts for customers and that issues cash cards authorizing access to accounts over the ATM network.ATM : …Bank Computer : …Cash Card : …Cashier : ...etc.
25
Identifying Associations
26
Extract verbs Eliminate spuriousassociations
Object
Classes
Tentative
associations
Associations
Associations between eliminated classesIrrelevant or implementation associationsActionsTernary associationsDerived associationsMisnamed associationsMultiplicity
Discard Unnecessary and Incorrect Associations
Discard Unnecessary and Incorrect Associations
Example: IAs for ATM NetworkHasHas
27
Consortium Ban
CentralComputer
BankComputer
RemoteTransaction
CashierTransaction
Cashier
CashierStation
Owns
Communicates with
Communicates with
Entered onEntered on
Entered onEntered on
Entered byEntered by
Owns
Owns
Authorized byAuthorized by
ConcernsConcerns
EmploysEmploysConcernsConcerns
ATM
k Code
Consists of HoldsBank Account
CashCard
HoldsCustomer
Communicates with
AccessesAccesses
HasHas
Identifying AttributesTentative attributes
28
Extract object properties
Eliminate spuriousattributes
Object
Classes
Attributes
ObjectsQualifiersNamesIdentifiersLink attributesInternal valuesFine detailDiscordant attributes
Discard Unnecessary and Incorrect Attributes
Discard Unnecessary and Incorrect Attributes
Example: IAT for ATM Network
29
CentralComputer Bank
Computer
RemoteTransaction
CashierTransaction
CashCard
Cashier
CashierStation
Owns
Communicates with
Communicates with
Entered onEntered on
Entered onEntered on
Entered byEntered by
Owns
Owns
Authorized byAuthorized by
HasHas
EmploysEmploysConcernsConcerns
Bank Code
Station Code
nameStation Code
Employee Code
Balancecredit limit
type
Station Code
Kinddate-timeamount
Kinddate-timeamount
name
password
Card Code
Consortium
ATM
Bank Code
Bank AccountCustomer
Consists of
Communicates with
HoldsHolds
HasHas
AccessesAccesses
ConcernsConcerns
cash on handdispensed
Account Code
IssuesIssues
nameaddress
Refining With Inheritance
This step is to organize classes by using inheritance to share common structureInheritance can be added in two directions :
Bottom Up : By generalizing common aspect of existing classes into a superclasses
By searching for classes with similar attributes, associations, or operationsFor each generalization, define a superclass to share common features
Top Down : By refining existing classes into specialized subclasses
This step is to organize classes by using inheritance to share common structureInheritance can be added in two directions :
Bottom Up : By generalizing common aspect of existing classes into a superclasses
By searching for classes with similar attributes, associations, or operationsFor each generalization, define a superclass to share common features
Top Down : By refining existing classes into specialized subclasses
30
Example: RWI for ATM Network
31
TransactionKind
date-timeamount
cash on handdispensed
CentralComputer
Bank Code
Station Code
BankComputer
Station Code
Bankname
Account Code
Station Code
Card Code
Employee Code
CashierStation
CashierTransaction
RemoteTransaction
CashCard
password
Communicates with
Communicates with
Communicateswith
Communicateswith
Owns
Owns
Owns
ConcernsConcerns
Authorized byAuthorized byEntered byEntered by
HoldsHolds
IssuesIssuesHasHas
ATM Entered onEntered on
ATM
Cashiername
EmploysEmploys Customername
address AccessesAccesses
Consortium Bank Code
HasAccount
Has
Balancecredit limit
type
Consists ofConsists of
Grouping Classes into ModulesA module is a set of classes that captures some logical subset of entire modelFor example: a model of computer operating system might contain modules for process control, device control, file maintenance, and memory management
32
Example: GCIM for ATM Network
Tellers: Cashier, Entry Station, Cashier Station, ATMAccount: Account, Cash Card, Card Authorization, Customer, Transaction, Update, Cashier Transaction, Remote TransactionBanks: Consortium, Bank
33
Dynamic Model
The dynamic model shows the time-dependent behavior of the system and the objects in it.Begin dynamic analysis by looking for event, externally visible stimuli and responses.The dynamic model is important for interactive systems, but insignificant for purely static data repository, such as database.
The dynamic model shows the time-dependent behavior of the system and the objects in it.Begin dynamic analysis by looking for event, externally visible stimuli and responses.The dynamic model is important for interactive systems, but insignificant for purely static data repository, such as database. 34
Dynamic Model
The following steps are performed in constructing a dynamic model
Prepare scenarios of typical interaction sequencesIdentify events between objectsPrepare an event trace for each scenarioBuild a state diagramMatch events between objects to verify consistency
The following steps are performed in constructing a dynamic model
Prepare scenarios of typical interaction sequencesIdentify events between objectsPrepare an event trace for each scenarioBuild a state diagramMatch events between objects to verify consistency
35
Example: DM for ATM NetworkUser ATM Consortium Bank
Insert card
request password
enter passwordverify account
verify card with bank
account OK bank account OK
request kind
enter kind
request amount
enter amountprocess transaction
process bank transaction
bank transaction succeed
36
dispense cashdispense cashtransaction succeed
request take cashrequest take cash
take cashtake cash
take cardtake card
display main screendisplay main screen
Functional Model
The functional model shows how values are computed, without regard for sequencing, decisions, or object structureThe functional model shows which values depend on which other values and the functions that relate themData flow diagrams are useful for showing functional dependencies
The functional model shows how values are computed, without regard for sequencing, decisions, or object structureThe functional model shows which values depend on which other values and the functions that relate themData flow diagrams are useful for showing functional dependencies
37
Example: FM for ATM Network
AccountCashCard
38User
read inputs
bank code,card codebank code,card code balancebalance
performtransaction
generateoutputs
Messages,cash,receipt
Messages,cash,receipt
password,transaction kind,amount,account type
password,transaction kind,amount,account type
Object-Oriented Implementation
39
Implementation ProcessClass DefinitionCreating ObjectsCalling OperationsUsing InheritanceImplementing Association
40
References -1-
[Booch-1991] Grady Booch, Object-Oriented Analysis and Design with Application, Benjamin/Cummings, 1991.[Booch-1999] Grady Booch, James Rumbaugh, and IvarJacobson, The Unified Modeling Language User Guide, Addison-Wesley, 1999.[Coad-1991] Peter Coad and Edward Yourdon, Object-Oriented Analysis, Yourdon Press, 1991.[Jacobson-1992] Ivar Jacobson, Magnus Christerson, Patrik Jonson, and Gunnar Overgaard, Object-Oriented Software Engineering: A Use Case Driven Approach, Addison-Wesley, 1992.
[Booch-1991] Grady Booch, Object-Oriented Analysis and Design with Application, Benjamin/Cummings, 1991.[Booch-1999] Grady Booch, James Rumbaugh, and IvarJacobson, The Unified Modeling Language User Guide, Addison-Wesley, 1999.[Coad-1991] Peter Coad and Edward Yourdon, Object-Oriented Analysis, Yourdon Press, 1991.[Jacobson-1992] Ivar Jacobson, Magnus Christerson, Patrik Jonson, and Gunnar Overgaard, Object-Oriented Software Engineering: A Use Case Driven Approach, Addison-Wesley, 1992.
41
References -2-[ Jacobson-1999] Ivar Jacobson, Grady Booch, and James Rumbaugh, The Unified Software Development Process, Addison-Wesley, 1999.[Rumbaugh-1991] James Rumbaugh, Michael Blaha, William Premerlani, Frederick Eddy, and William Lorenson, Object-Oriented Modeling and Design, Prentice Hall, 1991.[Rumbaugh-1999] James Rumbaugh, Ivar Jacobson, and Grady Booch, The Unified Modeling Language Reference Manual, Addison-Wesley, 1999.[Shlaer-1988] Sally Shlaer and Stephen J. Mellor, Object-Oriented System Analysis: Modeling the World in Data, Yourdon Press, 1988.
[ Jacobson-1999] Ivar Jacobson, Grady Booch, and James Rumbaugh, The Unified Software Development Process, Addison-Wesley, 1999.[Rumbaugh-1991] James Rumbaugh, Michael Blaha, William Premerlani, Frederick Eddy, and William Lorenson, Object-Oriented Modeling and Design, Prentice Hall, 1991.[Rumbaugh-1999] James Rumbaugh, Ivar Jacobson, and Grady Booch, The Unified Modeling Language Reference Manual, Addison-Wesley, 1999.[Shlaer-1988] Sally Shlaer and Stephen J. Mellor, Object-Oriented System Analysis: Modeling the World in Data, Yourdon Press, 1988. 42
References -3-[UML-1999] Unified Modeling Language Specification, Object Management Group, www.omg.org, 1999.[Wirfs-Brock-1990] Rebecca Wirfs-Brock, Brian Wilkerson, and Lauren Wiener, Designing Object-Oriented Software, Prentice Hall, 1990.
43
top related