Professional Documents
Culture Documents
Contents
An Introduction to the Object-Orientation An Introduction to the Object-Oriented Methodology Object-Oriented Notation Guide Object-Oriented Analysis and Design Object-Oriented Implementation
What is Object-Orientation
A new technology based on objects and classes A way of thingking to organizing software as a collection of discrete objects that incorporate both data structure and behaviour An abstraction of the real world based on objects and their interactions with other objects
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
Polymorphism
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.
Development Process
Object-Oriented Analysis
Object-Oriented Design
Object-Oriented Implementation
10
11
Object Instances
Class Name Attribute Operation
Instantiation Relationship
Class Name Class Name
12
Subclass 1
Subclass 2
13
Aggregation
Aggregation 1
Assembly Class
Aggregation 2
Assembly Class
Part 1 Class
Part 2 Class
Part 1 Class
Part 2 Class
14
Association
Association
Association Name Class 1 Role 1 Role 2 Class 2
Qualified Association
Association Name Class 1 qualifier Role 1 Role 2 1+ Class 2
Multiplicity of Associations
Class Exactly One Class Many Class One or More 15
Ternary Association
Association Name Class 1 Role 1 Role 2 Class 2
Role 3 Class 3
16
17
18
Problem Statement
Requirements Statement
Problem Scope What is needed Application Context Assumptions Performance Needs
19
20
System Architecture
ATM Station Consortium Computer Bank Computer
Cashier ATM Cash Card User User Interface Phone Lines Station Code Bank Code Phone Lines Consortium Cashier Station
Database
Account Customer
Card Authorization
Transaction
Transaction
Transaction
21
Statement
Object Classes
Redundant classes Irrelevant classes Vague classes Attributes Operations Roles Implementation constructs
22
Attribute
Cash Account Data Cost
Implementation
Access Transaction Log Software Comm Line
Redundant
Irrelevant
Good Classes
Account Cashier Station ATM Central Computer Bank Bank Computer Consortium Customer Cash Card Transaction Cashier
23
Identifying Associations
Object Classes
Extract verbs Tentative associations Eliminate spurious Associations associations
Associations between eliminated classes Irrelevant or implementation associations Actions Ternary associations Derived associations Misnamed associations Multiplicity
26
Bank
Employs Employs Owns
Account
Concerns Concerns
Customer
Central Computer
Bank Computer
Accesses Accesses
Cashier
Entered by Entered by Concerns Concerns Has Has
Cashier Station
Entered on Entered on
Cashier Transaction
ATM
Entered on Entered on
Remote Transaction
Authorized by Authorized by
Cash Card
27
Identifying Attributes
Object Classes
Extract object properties Tentative attributes Eliminate spurious Attributes attributes
Objects Qualifiers Names Identifiers Link attributes Internal values Fine detail Discordant attributes
28
Consortium
Owns
Bank Code
Bank
name Station Code
Account Holds Account Holds Code Balance Employee credit limit Code type
Customer
name address
Central Computer
Station Code
Owns
Bank Code
Communicates with
Bank Computer
Station Code
Concerns Concerns
name
Accesses Accesses
Cashier
Entered by Entered by Entered on Entered on Concerns Concerns Has Has
Cashier Transaction
Kind date-time amount
ATM
cash on hand dispensed
Authorized by Authorized by
Cash Card
password
29
Transaction
Kind date-time amount
Concerns Concerns
ATM
cash on hand dispensed
Cashier Station
Communicates with
Station Code
Cashier Transaction
Entered by Entered by
Remote Transaction
Authorized by Authorized by Issues Issues Cash Has Has Card
Central Computer
Owns
Code
Owns
Cashier
name
Bank Code
Bank Computer
Station Code
Employs Employs
Employee Code Card Code
Customer
name address
password
Accesses Accesses
Consortium
Bank Code
Bank
Consists of Consists of
name Account Code
Account
Balance credit limit type
31
32
33
Dynamic Model
The dynamic model shows the timedependent 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 sequences Identify events between objects Prepare an event trace for each scenario Build a state diagram Match events between objects to verify consistency
35
ATM
Consortium
Bank
dispense cash dispense cash request take cash request take cash take cash take cash take card take card display main screen display main screen
36
Functional Model
The functional model shows how values are computed, without regard for sequencing, decisions, or object structure The functional model shows which values depend on which other values and the functions that relate them Data flow diagrams are useful for showing functional dependencies
37
read inputs
perform transaction
generate outputs
password, password, transaction kind, transaction kind, amount, amount, account type account type
User 38
Object-Oriented Implementation
39
Implementation Process
Class Definition Creating Objects Calling Operations Using Inheritance Implementing 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 Ivar Jacobson, The Unified Modeling Language User Guide, Addison-Wesley, 1999. [Coad-1991] Peter Coad and Edward Yourdon, ObjectOriented 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. 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 ObjectOriented Software, Prentice Hall, 1990.
43