UML The Unified Modeling Language Excertos do livro

  • Slides: 14
Download presentation
UML: The Unified Modeling Language Excertos do livro: The Unified Modelling Language User Guide

UML: The Unified Modeling Language Excertos do livro: The Unified Modelling Language User Guide by Grady Booch, James Rumbaugh and Ivar Jacobson

UML: Use Cases – No system exists in isolation. Every system interacts with human

UML: Use Cases – No system exists in isolation. Every system interacts with human or automated actors that use the system for some purpose, and those actors expect that system to behave in predictable ways. – A use case specifies the intended behavior of a system or of part of a system, without specifying how that behavior is implemented. – Reasoning about how the system will be used, helps to design a use case

Use Cases – A use case represents a functional requirement of a system. –

Use Cases – A use case represents a functional requirement of a system. – A use case involves the interaction of actors and the system. An actor represents a coherent set of roles that users of use cases play when interacting with these use cases. – Actors can be human or automated systems. – Use cases can be applied to a whole system or to subsystems of it.

Use cases – A use case represente of a set of sequences of actions,

Use cases – A use case represente of a set of sequences of actions, that a system performs to yield an observable result to an actor. Every use case is rendered as an ellipse and has a unique name. – You can specify the behavior of a use case by describing a flow of events in text. – An actor represents a role that users of use cases play when interacting with these use cases. – You can define general kind of actors and specialize them using generalization

Use cases Acto r generalizatio n Acto r association Acto r Use case

Use cases Acto r generalizatio n Acto r association Acto r Use case

Use cases – You can organize use cases by specifying generalization, include and extend

Use cases – You can organize use cases by specifying generalization, include and extend relationships among them. – You apply these relationships in order to factor common behavior and in order to factor variants.

Use cases – Generalization among use cases is just like generalization among classes. –

Use cases – Generalization among use cases is just like generalization among classes. – Here it means that: ● ● ● the child use case inherits the behavior and meaning of the parent use case the child may add to or override the behavior of its parents The child may substitute any place the parent appears

Use Cases – An include relationship between use cases means that the base use

Use Cases – An include relationship between use cases means that the base use case explicitly incorporates the behavior of another use case. – The included use case never stands alone. – You use an include relationship to avoid describing the same flow of events several times, by putting the common behavior in a use case of its own. – You render an include relationship as a dependency, stereotyped as <<include>>.

Use cases: include relationship Aceder ao parque de estacioname nto Validar identificação do utente

Use cases: include relationship Aceder ao parque de estacioname nto Validar identificação do utente <<include>> > e> d lu c in << Aceder à biblioteca

Use Cases – An extend relationship between use cases means that the base use

Use Cases – An extend relationship between use cases means that the base use case implicitly incorporates the behavior of another use case. The base use case may stand alone, but under certain conditions, its behavior may be extended by the behavior of another use case. – You use an extend relationship to model the part of a use case the user may see as optional system behavior, or to model a subflow that is executed only under given conditions. – Extend relationships are rendered as dependencies, stereotyped as <<extend>>.

Use cases: extend relationship Devolver Livro <<extend>> Devolver Livro Danificado

Use cases: extend relationship Devolver Livro <<extend>> Devolver Livro Danificado

Use cases: library case study Requisitar livro Utente Devolver livro Renovar requisição Bibliotecário

Use cases: library case study Requisitar livro Utente Devolver livro Renovar requisição Bibliotecário

Casos de uso de uma Biblioteca Req. livro Utente Requisição publicação << <<extend>> inc

Casos de uso de uma Biblioteca Req. livro Utente Requisição publicação << <<extend>> inc lud e> > Req. revista Renovar req. public. <<include>> Bibliotecario Devolver publicação Req. public. Restrita Verificar ident. Utente <<i nc lud e> > <<extend>> Dev. public. e pagar dívida