代写代考 Software Design and Modelling

Software Design and Modelling
Textbook: 6 & 30
“The indispensable first step to getting the things you want out of life: decide what you want.”

Copyright By PowCoder代写 加微信 powcoder

Learning Objectives
On completion of this topic, you should be able to:
• Recognise and interpret use cases in their different forms and use case diagrams
• Relate use cases with include and extend associations, in both text and diagram formats
• Apply tests to identify suitable use cases

• Use cases are widely used to discover and record requirements
• Use cases are text stories of some actor using a system to meet goals
• Use cases emphasize the user goals and perspective: “Who is using the system, what are their typical scenarios of use, and what are their goals?”
Checkout use case for POS: A customer arrives at a checkout with items to purchase. The cashier uses the POS system to record each purchased item. The system presents a running total and line-item details. The customer enters payment information, which the system validates and records. The system updates inventory. The customer receives a receipt from the system and then leaves with the items.
The Orthopaedic Workstation (OWS) system: The surgeon inspects and annotates an OWS x-ray; judgement is made regarding the femur neck resection lines and location of replacement components. Decisions are also made by the surgeon regarding type and size of replacement components, and the accessories needed for the operation. An operation plan is prepared to reflect decisions made during Pre-Operative Planning. Orders for the components and accessories are generated. A Fad may also be prepared and some details of the Pre-Operative Plan are added to Patient Details.

Definitions
• SuD: System-under-Discussion
• Actor: something with behaviour, such as a person, computer system or organisation
(e.g. a cashier).
• Scenario (or use case instance): a specific sequence of actions and interactions between actors and the SuD.
• Use case: a collection of related success and failure scenarios that describe an actor using the SuD to support a goal.

Example: Handle Returns (casual)
A main success scenario for Handle Returns use case for POS
A customer arrives at a checkout with items to return. The cashier uses the POS system to record each returned item …
Alternative scenarios
If the customer paid by credit, and the reimbursement transaction to their credit account is rejected, inform the customer and pay them with cash.
If the system detects failure to communicate with the external accounting system, …

Three kinds of actors
• Primary actor has user goals fulfilled through using services of the SuD (e.g. the cashier).
– User goals drive the use case
• Supporting actor provides a service (e.g. information) to the SuD to clarify external interfaces and protocols (e.g. an automated payment authorization service)
– Usually be a computer system but could be an organization or person.
• Offstage actor has an interest in the behaviour of the use case, but is not primary or supporting (e.g. a government tax agency).
– Ensure all interests identified/satisfied

Use Case Influence in Unified Process (UP)
• The use cases influence many aspects of a software development project
– Implementation
– Project Management
• Use cases are key source of information of OO analysis and testing
• Use cases should be strongly driven by the goals of the project
Sample UP Artifact Relationships Domain Model
Business Modeling
Use-Case Model
use case names
Sales LineItem
objects, attributes, associations
scope, goals, actors, features
terms, attributes, validation
Process Sale
Process Sale
1. Customer arrives …
2. Cashier makes new sale.
Require- ments
Use Case Diagram
Use Case Text
system events
Operation: enterItem(…)
Post-conditions: -…
make NewSale()
Supplementary Specification
system operations
enterItem (id, quantity)
re qu ir em e nts
Operation Contracts
System Sequence Diagrams
Design Model
spec = getProductSpec( itemID ) addLineItem( spec, quantity )
non-functional reqs, quality attributes
: Register (itemID, quantity)
: ProductCatalog

. . . quantity
Use-Case Model
• Use-Case Model: A model of the system’s functionality and environment
– Primarily includes the set of all written use cases
– Optionally includes a UML use case diagram Require-
objects, attributes, associations
Use-Case Model
use case names
Process Sale
Use Case Diagram
Use Case Text
system events
make NewSale()
enterItem (id, quantity)
Operation Contracts
System Sequence Diagrams
Process Sale
1. Customer arrives …
2. Cashier makes new sale.
Operation: enterItem(…)
Post-conditions: -…
system operations

UML use-case diagram
• A UML use case diagrams gives a context diagram of a system and its environment
– Showing the names of use cases, actors and their relationships
A UML use case diagram for Monopoly Simulation System
system boundary
actor Cashier
«actor» Sales Activity System
System Administrator
NextGen POS Process Sale
Handle Returns
Cash In Analyze Activity
Manage Security Manage Users
communication
Payment Authorization Service
«actor» Tax Calculator
«actor» Accounting System
«actor» HR System
alternate notation for a computer system actor
A UML use case diagram for POS

Finding Useful Use Cases
“What is a useful level to express use cases for application requirements analysis?” Boss Test
– If your boss asks: “What have you been doing all day?” and you reply: “Logging in!”, will your boss be happy?
– Is “Log In” use case useful?
Elementary Business Process (EBP) Test
– A task performed by one person in one place at one time, in response to a business event, which
adds measurable business value and leaves the data in a consistent state
– Does a use case like “delete a line item” reflect EBPs? What about “Handle Returns”?
Is a task very seldom a single action/step; typically many steps; fully dressed often require 3–10 pages of text

Example: Applying Tests
Negotiate a Supplier Contract
Much broader and longer than an EBP. Could be modelled as a business use case, rather than a system use case.
Handle Returns
OK with the boss. Seems like an EBP. Size is good.
Boss will not be happy if this is all you do all day!
Move Piece on Game Board
Single step—fails the size test.

Summary & Remarks
Use Cases are text descriptions of an actor using the system to achieve a goal. Use Case Diagrams provide a context of use cases and show some relationships
between use cases and actors
Use Cases should cover both success and failure scenarios.
Use cases can be at different levels of detail.
– Use the tests to identify the useful use cases
Need more examples of use cases? Checkout Tony’s Pizza Case study in LMS!

Lecture Identification
Semester 1, 2022
© University of Melbourne 2022
These slides include materials from:
Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development, Third Edition, by , Inc., 2005.

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com