Object Oriented Analysis Process

42
Object Oriented Analysis Process Identifying Use Cases

description

Object Oriented Analysis Process. Identifying Use Cases. Session Objectives. Introduction Why Analysis is difficult Business Object Analysis: Understanding the business layer Use case Driven Object Oriented Analysis: Unified Approach Business Process Modeling. Session Objectives. - PowerPoint PPT Presentation

Transcript of Object Oriented Analysis Process

Page 1: Object Oriented Analysis Process

Object Oriented Analysis ProcessIdentifying Use Cases

Page 2: Object Oriented Analysis Process

Session ObjectivesIntroductionWhy Analysis is difficultBusiness Object Analysis:

Understanding the business layerUse case Driven Object Oriented

Analysis: Unified ApproachBusiness Process Modeling

Page 3: Object Oriented Analysis Process

Session ObjectivesUse Case Model

◦Use Case User Microscope◦Uses and Extends Associations◦Identify the Actors◦Guidelines for Finding Use Cases◦How Much Detailed must be a use

case be?◦Dividing Use Cases into Packages◦Naming a use case

Page 4: Object Oriented Analysis Process

Session ObjectivesDeveloping Effective

Documentation◦Guidelines

Case Study: Analysing the ViaNet ATM

Page 5: Object Oriented Analysis Process

IntroductionAnalysis is the process of

transforming a problem definition from a fuzzy set of facts and myths into a coherent statement of system’s requirements.

Tools used are: Examination of existing system documents, Interviews , Questionnaire, Observations

Page 6: Object Oriented Analysis Process

Why Analysis is Difficult?Analysis is a creative activity that

involves understanding the problem, its associated constraints , and methods of overcoming those constraints.

This is an iterative process and goes until problem is completely understood.

Common Problems in analysis are◦Fuzzy and ambiguous requirements◦Incomplete Requirements◦Unnecessary Features

Page 7: Object Oriented Analysis Process

Why analysis is a Difficult ActivityA common problem that leads to

requirement ambiguity is a fuzzy and ambiguous description, such as "fast response time" or "very easy and very secure updating mechanisms."

However, because of the iterative nature of object-oriented analysis and the unified approach, most of the incomplete requirements can be identified in subsequent tries

Page 8: Object Oriented Analysis Process

Business Object Analysis: Understanding the Business LayerBusiness object analysis is a process of

understanding the system requirements and establishing the goals of application.

Main Activity is to understand the system requirements.

The outcome of the business object analysis is to identify classes that make up the business layer and the relationships that play a role in achieving system goals.

Page 9: Object Oriented Analysis Process

Business Object Analysis: Understanding the Business LayerTo understand the users' requirements, we

need to find out how they "use" the system.

This can be accomplished by creating use cases.

Usually, domain users or experts are the best authorities.

Try to understand the expected inputs and desired responses.

Defer unimportant details until later. State what must be done, not how it should be done.

Page 10: Object Oriented Analysis Process

Business Object Analysis: Understanding the Business LayerPreparation of a prototype usually

can help you better understand how the system will be used, and therefore it is a valuable tool during business object analysis.

Separating the what from the how is no simple process.

Fully understanding a problem and defining how to implement it may require several tries or iterations.

Page 11: Object Oriented Analysis Process

Use Case Driven Object Oriented AnalysisIdentify the Actors

◦Who is using the system?◦ In New Case who will be using the system.

Develop a Simple Business Process Model using UML Diagrams

Develop the use case:◦What are users doing with the system?◦Or In New Case what will users be doing

with the systemPrepare interaction Diagrams

◦Sequence and Collaboration Diagrams

Page 12: Object Oriented Analysis Process

Use Case Driven Object Oriented AnalysisClassification

◦Identify Classes◦Indentify Relationships◦Identify Attributes◦Identify methods

Iterate and Refine: If needed, repeat the preceding steps.

Page 13: Object Oriented Analysis Process

Use-Case ModelUse Case are scenarios for

understanding system requirements.A use case is an interaction between

users of the system and the system itself. It captures the goal of the users and the responsibility of the system to its users.

A use case model describesUse case can discover classes and

the relationships among subsystems.

Page 14: Object Oriented Analysis Process

Use Cases Under MicroscopeUse case: is a flow of events through

the system. By definition many courses are available.

Actor: is a user playing a role w.r.t the system

In a system: simply means that the actor communicates with the system’s use case.

Transaction: is an atomic set of activities that are performed either fully or not at all.

Page 15: Object Oriented Analysis Process

Use Cases Under MicroscopeA measurable value. A use

case must help the actor to perform a task that has some identifiable value; for example, the performance of a use case in terms of price or cost.

For example, borrowing books is something of value for a member of the library.

Page 16: Object Oriented Analysis Process

Use case Diagram of library system

Page 17: Object Oriented Analysis Process

Uses and Extends AssociationThe extends association is used when

you have one use case that is similar to another use case but does a bit more or is more specialized.

The uses association occurs when you are describing your use cases and notice that some of them have subflows in common. For Ex: Checking library card I common for book borrow ,return books and interlibrary loan use cases.

Page 18: Object Oriented Analysis Process

Identifying the ActorsIdentifying the actors is as

important as identifying classes, structures, association, attributes and behavior

The term actor represents the role a user plays with respect to system.

Users may play one or many roles.

Jacobson et al provides 2-3 rule: Start naming atleast 2 to 3 persons who could serve as the actors of the system.

Page 19: Object Oriented Analysis Process

Guidelines for Finding Use CasesFor each actor find the tasks and functions

that the actor should perform.Name the use casesDescribe the use cases briefly by applying

terms with which users are familiar.It is important to separate actors from

users. The actor represents a role that one or more users can play.◦ Identify users from actors◦ Identify actors from other actors◦ Isolate use cases that have different initiating

actors.

Page 20: Object Oriented Analysis Process

How detailed a use case must be?Jacobson believes that in most

use cases, too much detail may not be very useful.

For a 10-person-year project 20 use cases must be created.

Prepare one scenario for each different use case.

When arrived at the lowest use case level, you may create a sequence diagram and collaboration diagrams.

Page 21: Object Oriented Analysis Process

Naming Use casesNames should provide a general

description of the use case function.

Name should tell what happens when an instance of the use case is performed

Jacobson recommends that the name should be active, often expressed in form of verb or noun.

Page 22: Object Oriented Analysis Process

Dividing Use Case into PackagesA design is broken into packages.

Separate packages must be created for each scenarios.

Borrow Books

Do Research

Purchase Books

Borrow Books

Return Books

Get Interlibrary

Page 23: Object Oriented Analysis Process

DocumentationA document can serve as a

communication vehicle among the project’s team members, or it can serve as an initial understanding of the requirements.

Plays an important role in making decisions.

It becomes difficult to document a poorly understood problem

Page 24: Object Oriented Analysis Process

Guidelines for developing a documentationCommon Cover80-20 RuleFamiliar vocabularyMake the document as short as

possibleOrganize the document.

Page 25: Object Oriented Analysis Process

Case Study: Analyzing Via Net Bank ATMThe bank client must be able to deposit an

amount and withdraw an amount from his or accounts. Each transaction must be recorded.

The Via Net bank client can have two type of accounts: Checking and Savings

For each checking account one savings account can exists.

PIN code consisting of integer digits between 0 to 9

PIN code allows access to all the accounts.No receipts will be provided for any account

transaction.

Page 26: Object Oriented Analysis Process

Case Study: Analyzing the Via Net ATMThe Bank application operates for a single

banking institution only.Neither a saving nor checking account have a

negative balance. The system should automatically withdraw

money from a related savings account if the requested withdrawal amount on the checking account is more than its current balance.

If the balance on a savings account is less than the withdrawal amount requested, the transaction will stop and the bank client will be notified.

Page 27: Object Oriented Analysis Process

Identifying Actors and Use Cases for the ViaNet Bank ATM SystemThe bank application will be used by one

category of users: bank clients.Notice that identifying the actors of the

system is an iterative process and can be modified as you learn more about the system.

The actor of the bank system is the bank client.

The bank client must be able to deposit an amount to and withdraw an amount from his or her accounts using the bank application.

Page 28: Object Oriented Analysis Process

Identifying Actors and Use Cases for the ViaNet Bank ATM SystemUse-case name: Bank ATM transaction. The bank

clients interact with the bank system by going through the approval process. After the approval process, the bank client can perform the transaction. Here are the steps in the ATM transaction use case:◦ Insert ATM card.◦ Perform the approval process.◦ Ask type of transaction.◦ Enter type of transaction.◦ Perform transaction.◦ Eject card.◦ Request take card.◦ Take card.

Page 29: Object Oriented Analysis Process

Activities involved in ATM transaction

Page 30: Object Oriented Analysis Process

Identifying Actors and Use Cases for the ViaNet Bank ATM SystemUse-case name: Invalid PIN. If the

PIN code is not valid, an appropriate message is displayed to the client. This use case extends the approval process.

Page 31: Object Oriented Analysis Process

Transaction use cases

Page 32: Object Oriented Analysis Process

Identifying Actors and Use Cases for the ViaNet Bank ATM SystemUse-case name: Deposit amount.

The bank clients interact with the bank system after the approval process by requesting to deposit money to an account. The client selects the account for which a deposit is going to be made and enters an amount in dollar currency. The system creates a record of the transaction.

Page 33: Object Oriented Analysis Process

Identifying Actors and Use Cases for the ViaNet Bank ATM SystemThis use case extends the bank

ATM transaction use case. Here are the steps:

Request account type.Request deposit amount.Enter deposit amount.Put the check or- cash in the

envelope and insert it into ATM.

Page 34: Object Oriented Analysis Process

Identifying Actors and Use Cases for the ViaNet Bank ATM SystemUse-case name: Deposit savings.

The client selects the savings account for which a deposit is going to be made. All other steps are similar to the deposit amount use case. The system creates a record of the transaction. This use case extends the deposit amount use case.

Page 35: Object Oriented Analysis Process

Identifying Actors and Use Cases for the ViaNet Bank ATM SystemUse-case name: Withdraw more from

checking. The client tries to withdraw an amount from his or her checking account. If the amount is more than the checking account's balance, the insufficient amount is withdrawn from the related savings account. The system creates a record of the transaction and the withdrawal is successful. This use case extends the withdraw checking use case and uses the withdraw savings use case.

Page 36: Object Oriented Analysis Process

Identifying Actors and Use Cases for the ViaNet Bank ATM System

Page 37: Object Oriented Analysis Process

Identifying Actors and Use Cases for the ViaNet Bank ATM SystemUse-case name: Withdraw

savings. The client tries to withdraw an amount from a savings account. The amount is less than or equal to the balance and the transaction is performed on the savings account. The system creates a record of the transaction since the withdrawal is successful. This use case extends the withdraw amount use case.

Page 38: Object Oriented Analysis Process

Identifying Actors and Use Cases for the ViaNet Bank ATM System

Page 39: Object Oriented Analysis Process

Identifying Actors and Use Cases for the ViaNet Bank ATM SystemUse-case name: Withdraw

savings denied. The client withdraws an amount-from a savings account. If the amount is more than the -balance, the transaction is halted and a message is displayed. This use case extends the withdraw savings use case.

Page 40: Object Oriented Analysis Process

Identifying Actors and Use Cases for the ViaNet Bank ATM SystemUse-case name: Checking

transaction history. The bank client requests a history of transactions for a checking account. The system displays the transaction history for the checking account. This use case extends the bank transaction use case.

Page 41: Object Oriented Analysis Process

Identifying Actors and Use Cases for the ViaNet Bank ATM SystemUse-case name: Savings

transaction history. The bank client requests a history of transactions for a savings account. The system displays the transaction history for the savings account. This use case extends the bank transaction use case.

Page 42: Object Oriented Analysis Process

The ViaNet Bank ATM Systems PackagesEach use case represents a

particular scenario in the system. It is better to break down the use

cases into packages. Narrow the focus of the scenarios in

the system. In the bank system, the various

scenarios involve checking account, savings account, and general bank transactions.