Object-Oriented Analysis and Design Methodology

Romi Satria Wahono
Email : romi@romisatriawahono.net HP : http://romisatriawahono.net Copyright © 2003 IlmuKomputer.Com

1

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

2

An Introduction to the Object-Orientation

3

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

4

from the internal implementation details of object.Three Characteristics of OO Abstraction and Classification : Focusing on essential. which are accessible to other objects. which are hidden from other objects Polymorphism and Inheritance : Ability of abstractions to share properties by inheritance hierarchy Abstraction Object-Oriented Object-Oriented System System Encapsulation Polymorphism 5 . The idea of grouping software ideas into classes of things Encapsulation and Information Hiding : Separating the external aspects of an object. inherent aspects of an entity and ignoring its accidental.

Classes A class is a description of a collection of objects with common attributes and behavior. the methods implementing the behavior. the definition or specification of a class includes the definitions of the attributes comprising the state. and can be distinguished from other objects. An object has state (attributes) and behavior (method) Individual objects. and how to handle creation and destruction of an object. 6 . have identity and are distinct things. also called instances. It can be a real-world thing or concept.Object and Classes Object An object is a thing or concept. In practice. or an abstraction of a thing or concept expressed as a software representation.

An Introduction to the ObjectOriented Methodology 7 .

What Are Analysis and Design For Testing a physical entity before building system Communicating with Customers Visualization Reduction 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 Object Class Class Name Attribute Operation Object Instances Class Name Attribute Operation Instantiation Relationship Class Name Class Name 12 .

Generalization and Inheritance Superclass 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 .

Object-Oriented Analysis and Design 17 .

Analysis and Design Process Problem Statement System Architecture Object Modeling Identifying Object Classes Preparing a Data Dictionary for Classes Identifying Associations Identifying Attributes Refining with Inheritance Grouping Classes into Modules Dynamic Modeling Functional Modeling 18 .

Problem Statement Requirements Statement Problem Scope What is needed Application Context Assumptions Performance Needs 19 .

Example : ATM Network Cashier Station Account Account Account Account ATM ATM ATM Central Computer Bank Computer Bank Computer 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 .

Identifying Object Classes Requirements Extract nouns Tentative Object Classes Statement Eliminate spurious Classes Object Classes Discard Unnecessary and Incorrect Classes Redundant classes Irrelevant classes Vague classes Attributes Operations Roles Implementation constructs 22 .

Example: IOC for ATM Network Bad Classes Vague System Security Provision Banking Network Record Keeping Provision Receipt Transaction Data User 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 .

and operation 24 . so prepare a data dictionary for all modeling entities Describe the scope of the class within the current problem.Preparing a Data Dictionary Isolated word have many interpretations. including assumptions or restrictions on its membership or use The data dictionary also describes associations. attributes.

A customer can hold more than one account..Example: DD for ATM Network Account : a single account in a bank against which transactions can be applied. at least checking or savings.. ATM : … Bank Computer : … Cash Card : … Cashier : . Account may be of various types. Bank : A financial institution that holds accounts for customers and that issues cash cards authorizing access to accounts over the ATM network. etc. 25 .

Identifying Associations Object Classes Extract verbs Tentative associations Eliminate spurious Associations associations Discard Unnecessary and Incorrect Associations Associations between eliminated classes Irrelevant or implementation associations Actions Ternary associations Derived associations Misnamed associations Multiplicity 26 .

Example: IAs for ATM Network Consortium Bank Owns Consists of Holds Holds Has Has Code Owns Communicates with Bank Employs Employs Owns Account Concerns Concerns Customer Central Computer Bank Computer Accesses Accesses Cashier Entered by Entered by Concerns Concerns Has Has Communicates with Communicates with 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 Discard Unnecessary and Incorrect Attributes Objects Qualifiers Names Identifiers Link attributes Internal values Fine detail Discordant attributes 28 .

Example: IAT for ATM Network Consists of Card Code Consortium Owns Bank Code Bank name Station Code Account Holds Account Holds Code Balance Employee credit limit Code type Issues Issues Has Has Customer name address Central Computer Station Code Owns Bank Code Communicates with Bank Computer Station Code Employs Employs Owns Concerns Concerns name Accesses Accesses Cashier Entered by Entered by Entered on Entered on Concerns Concerns Has Has Communicates with Cashier Communicates with Entered on Entered on Station Remote Transaction Kind date-time amount Cashier Transaction Kind date-time amount ATM cash on hand dispensed Authorized by Authorized by Cash Card password 29 .

define a superclass to share common features Top Down : By refining existing classes into specialized subclasses 30 . or operations For each generalization. associations.Refining With Inheritance This step is to organize classes by using inheritance to share common structure Inheritance 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.

Example: RWI for ATM Network ATM Entered on Entered on 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 Communicates Station with Central Computer Owns Code Owns Cashier name Bank Code Communicates Communicates Owns with with 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 Has Has Holds Holds Account Balance credit limit type 31 .

Grouping Classes into Modules A module is a set of classes that captures some logical subset of entire model For example: a model of computer operating system might contain modules for process control. and memory management 32 . device control. file maintenance.

Example: GCIM for ATM Network Tellers: Cashier. Card Authorization. Cash Card. Transaction. Entry Station. Cashier Station. Customer. Bank 33 . Update. ATM Account: Account. Cashier Transaction. Remote Transaction Banks: Consortium.

Begin dynamic analysis by looking for event. 34 . The dynamic model is important for interactive systems. but insignificant for purely static data repository.Dynamic Model The dynamic model shows the timedependent behavior of the system and the objects in it. externally visible stimuli and responses. such as database.

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 .

Example: DM for ATM Network User Insert card request password enter password verify account account OK request kind enter kind request amount enter amount process transaction process bank transaction bank transaction succeed transaction succeed ATM Consortium Bank verify card with bank bank account OK 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 .

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 .Functional Model The functional model shows how values are computed. decisions. without regard for sequencing.

amount. Messages. account type account type Messages. transaction kind. card code card code balance balance read inputs perform transaction generate outputs password. cash. cash. amount. password. transaction kind. bank code.Example: FM for ATM Network Cash Card Account bank code. receipt receipt User 38 .

Object-Oriented Implementation 39 .

Implementation Process Class Definition Creating Objects Calling Operations Using Inheritance Implementing Association 40 .

1992. Yourdon Press. [Coad-1991] Peter Coad and Edward Yourdon. Benjamin/Cummings. Magnus Christerson. 1999. 1991. Patrik Jonson. 1991. [Jacobson-1992] Ivar Jacobson. [Booch-1999] Grady Booch. Object-Oriented Analysis and Design with Application. Addison-Wesley. and Gunnar Overgaard. Object-Oriented Software Engineering: A Use Case Driven Approach. James Rumbaugh. and Ivar Jacobson.References -1[ Booch-1991] Grady Booch. 41 . The Unified Modeling Language User Guide. Addison-Wesley. ObjectOriented Analysis.

1991. Object-Oriented Modeling and Design. and James Rumbaugh. Michael Blaha. [Shlaer-1988] Sally Shlaer and Stephen J.References -2[ Jacobson-1999] Ivar Jacobson. Ivar Jacobson. Object-Oriented System Analysis: Modeling the World in Data. The Unified Modeling Language Reference Manual. 42 . [Rumbaugh-1999] James Rumbaugh. 1988. Grady Booch. [Rumbaugh-1991] James Rumbaugh. Yourdon Press. Frederick Eddy. and William Lorenson. Mellor. Prentice Hall. 1999. Addison-Wesley. The Unified Software Development Process. and Grady Booch. Addison-Wesley. William Premerlani. 1999.

Object Management Group.org. 1999. 43 . www. [Wirfs-Brock-1990] Rebecca Wirfs-Brock. 1990. Designing ObjectOriented Software.References -3[ UML-1999] Unified Modeling Language Specification. Prentice Hall. Brian Wilkerson.omg. and Lauren Wiener.

Sign up to vote on this title
UsefulNot useful