Post on 13-Nov-2014
description
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
1
Class 9
UML: Use Case Class Diagram Modelling
Relational ModelAno 2013
Sistemas de Informaçãopara a Indústria
António Grilo, Izunildo CabralProf. Auxiliar FCT-UNL,
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
2
Content
• What is UML?• Types of UML diagrams• Use case modelling• Use case diagram
- Core elements
- Examples• Class diagram (the Entity Relationships, E-R)
- Core elements
- Examples• References
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
3
What is UML?
The UML is a language for the visual modelling of software systems. The reasons for the wide appliance of the UML to modelling software systems (and non-software too), stand in the fact that the UML is only a rich notation independent from the modelling process, which gives possibilities for defining different approaches with the use of the language in different manners and for different purposes (Brdjanin, Maric, & Ieee, 2007).
In UML, five views of a system can be developed:
Use case (external user perspective) Logical (internal system design) Component (architectural constituents) Concurrency (describing mechanisms of co-ordination between independently
processing system parts) Deployment (mapping system parts onto a physical architecture)
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
4
Types of UML diagrams
From UML views a series of diagrams are developed. They are:
Use case Class Object State Sequence Collaboration Activity Component Deployment
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
5
Use case modelling
Use case modelling was first presented as part of the Object-Oriented Software Engineering (OOSE) methodology for software development (Jacobson et al., 1992, 1995).
Use case modelling is a requirement engineering technique that similarly leads to the identification od system activities, but is driven more by the needs of the system’s users than those of the system. In use case modelling, a system is defined by a set of use cases, each describing a system requirement (transaction or function) (Bustard, He, & Wilkie, 2000).
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
6
Use cases and use cases diagram
A use case is a description of system usage and represent a very suitable tool for the identification and specification of system requirements. Use case modelling is concerned with system description in a conceptual way.
Use case diagrams show the interaction of the system with external entities, the so-called actors and describe the functionality of the system as a black box, without revealing its internal structure (Back, Petre, & Paltor, 1999).
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
7
Use cases diagram – core elements
Source: T. A. Pender, 2002
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
8
Use cases diagram – core elements
System - sets the boundary of the system in relation to the actors who use it (outside the system) and the features it must provide (inside the system) (T. A. Pender, 2002).
Actors - Roles adopted by external entities that interact with the system directly (Arlow & Neustadt, 2005). Represent the agents who carry out, or cause to be carried out, the main activities of the system (Bustard, He, & Wilkie, 2000).
Use case - identifies a key feature (requirements) of the system (T. A. Pender, 2002).
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
9
Use cases diagram – core elements
Association - identifies an interaction between actors and Use Cases (T.A. Pender, 2002).
Dependency - identifies a communication relationship between two use cases (T. A. Pender, 2002).
Generalization - defines a relationship between two actors or two use cases where one use case inherits and adds to or overrides the properties of the other (T. A. Pender, 2002).
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
10
Use cases diagram – examples
Consider the example of a Car Driver visiting a Shopping Centre:
Actors: Car Driver and Shopping Centre Information System (IS).
Description of the use case diagram (enter the Car Park): the Car Driver visit the Shopping Centre and attempt to enter in the Park. The Shopping Centre IS will check if space is available, and if so increment the number of Cars present, allow the Car Driver to enter, and record the date and time of entry. If the park is full, the driver wait or drive on.
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
11
Use cases diagram – Car Driver example
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
12
Use cases diagram – login into a Supply Chain IS
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
13
Use cases diagram – search and insert a conference
Source: António, 2008
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
14
Use cases diagram – check suppliers’ inventory level
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
15
Use cases diagram – calculate the SC LARG performance
Super Entity
Insert Entity ID
Introduce LARGindicators
Edit system content
Search for LARGindicators
Extract LARGindicators
Data analysis
Define formula
Extract LARGperformance
System
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
16
Class diagram – the Entity Relationship, E - R
Class diagram (overview)
Classes represent things; relationships represent the connections between things (Vidgen, 2003).
The class diagram illustrates the structural component of the system and clearly identifies the classes, interfaces and their relationships within the system (António, 2008).
Besides representing the concepts, the class diagram allows us to establish the relationships between classes (António, 2008).
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
17
Class diagram – core elements and types of relationships
Source: Haug et al., 2010
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
18
Class diagram – class notation
Source: T. A. Pender, 2002
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
19
Class diagram – relationships description
Assotiation - An association is a structural relationship between things showing that one can navigate from the instances of one class to the instances of another (and possibly vice versa) (Vidgen, 2003).
Source: T. A. Pender, 2002
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
20
Class diagram – relationships description
Aggregation – is a special type of association used to indicate that the participating objects are not just independent objects that know about each other (T. A. Pender, 2002). Represents the association that exists when an object contains other (António, 2008).
Source: T. A. Pender, 2002
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
21
Class diagram – relationships description
Composition – is a special way of aggregation, with the restriction that the objects components belong, in fact, the object compound (António, 2008). Is used for aggregations where the life span of the part depends on the life span of the aggregate (T. A. Pender, 2002).
Source: T. A. Pender, 2002
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
22
Class diagram – aggregation vs composition
Source: T. A. Pender, 2002
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
23
Class diagram – relationships description
Generalization – is the process of organizing the properties of a set of objects that share the same purpose. Generalization relates classes together where each class contains a subset of the elements needed to define a type of object (T. A. Pender, 2002).
Source: T. A. Pender, 2002
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
24
Class diagram – relationships description
Dependence – the dependence relationships is used to describe situations in which a class depends on the other (António. 2008).
Source: T. A. Pender, 2002
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
25
Class diagram – examples
Source: T. A. Pender, 2002
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
26
Class diagram – examples
Source: Alsaadi, 2006
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
27
References
- Cabral, I. F. (2011). An Information Model for Lean, Agile, Resilient and Green
Supply Chain Management. Master thesis, FCT/UNL.
- Jacobson, I., Christerson, Jonsson, P., & Overgaard, G. (1992). Object Oriented
Software Engineering: A Use Case Driven Approach.
- Jacobson, I., Ericcson, M., & Jacobson, A. (1995). The Object Advantage:
Business Process Re-Engineering With Object Technology.
- Bustard, D. W., He, Z., & Wilkie, F. G. (2000). Linking soft systems and use-
case modelling through scenarios. Interacting with Computers, 13(1), 97-110.
- Brdjanin, D., Maric, S., & Ieee. (2007). An example of use-case-driven
conceptual design of relational database.
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
28
References
- António, N. R. (2008). Um Processo de Modelação de Sistemas Software com
Integração de Especificações Rigorosas. (PhD), Universidade do Minho.
- Pender, T. A. (2002). UML Weekend Crash Course
- Arlow, J., & Neustadt, I. (2005). UML 2 and the Unified Process.
- Back, R. J., Petre, L., & Paltor, I. R. (1999). Analysing UML use cases as
contracts. In R. France & B. Rumpe (Eds.), Uml'99 - the Unified Modeling
Language - Beyond the Standard (Vol. 1723, pp. 518-533). Berlin: Springer-
Verlag Berlin.
Sistemas de Informação para Indústria© António Grilo 2013Departamento de Engenharia Mecânica e Industrial
29
References
- Vidgen, R. (2003). Requirements analysis and UML - Use cases and class
diagrams. [Article]. Computing & Control Engineering Journal, 14(1), 12-17.
- Haug, A., Hvam, L., & Mortensen, N. H. (2010). A layout technique for class
diagrams to be used in product configuration projects. Computers in Industry,
61(5), 409-418. doi: 10.1016/j.compind.2009.10.002.
- Alsaadi, A. (2006). Applying the UML class diagram in the performance analysis.
In A. Horvath & M. Telek (Eds.), Formal Methods and Stochastic Models for
Performance Evaluation (Vol. 4054, pp. 148-165). Berlin: Springer-Verlag Berlin.