Download presentation
Presentation is loading. Please wait.
1
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 Use cases: deciding what you want
2
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Requirements What is the system required to do? Functional requirements: what the system is expected to do Non-functional requirements: how well the system will provide the functionalities Usability requirements: good match between the system and the users
3
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Functional requirements Describe what processings the system is required to carry out Provide details of the inputs to the system Provide details of the outputs: reports, forms, windows, etc. Provide details of the data the system will held processing data inputsoutputs
4
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Use cases Specify the behaviour of the system from the user point of view Some ways to do them: –Text: use case descritions –UML: sequence diagrams –UML: collaboration diagrams
5
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Use case descriptions Text stories used to discover and record requirements How to identify and write use cases UML diagrams Example: how does a supermarket sells items?
6
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Use cases Example: how does a supermarket sells items? The customers enter the supermarket and choose the items by themselves. Then they to the checkout with items to purchase. The cashier registers each purchased item. The system presents the total amount to be paid and a list with the items. 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.
7
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Example Identify each entity in the figure with the example: processing data inputsoutputs
8
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Actors, Scenarios, and Use Case An actor is something with behaviour: person, computer system, dog, engine, etc. A scenario is a specific sequence of actions and interactions between actors and the system Use case is a collection of success and failure scenarios that take place when an actor use the system.
9
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Important points about use cases They are text documents They say nothing about object oriented analysis, design or programming! Their goal is to help you to decide what you want to do
10
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Types of actors Primary actor –fulfills goals using the system services –Example: clerk in a bank –helps to find the user goals Supporting actor –provides a service to the system –example: validate user credit-card –helps clarify external interfaces Offstage actor –external interest in the case –example: tax agency –helps to be sure that all interests are identified
11
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Some guidelines Black-box: the system is described as having responsibilities (what the system do, rather than how) Short text: ”the system records the sale” rather than ”the system writes the sale to a database” or ”the system generates a SQL INSERT statement for the sale…”
12
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Use cases You might gather too many requirements: –Might be outside the scope of the system –May be too ambitious –May not be necessary at this stage of the project
13
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Use cases Not everything fits perfectly: better to refer to the game manual rules than to describe them in the use cases Game user Play game
14
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Use case diagram Shows the actors, use cases and system boundary Game user Play game Use case System boundary Communication association Actor
15
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Sequence diagrams They allow us to: Create sequence diagrams for use case scenarios Identify system events Show input and output events
16
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Toy examples Write use cases for: 1.Tic-tac-toe game 2.A system to sell pizzas online 3.A coffee vending-machine 4.A library system to borrow books
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.