Sie sind auf Seite 1von 10

3.

Design
3.1 Introduction about UML Diagrams
Unified Modeling Language (UML) is a standardized general-purpose modeling language in the field of object-oriented software engineering. The standard is managed, and was created by, the Object Management Group. UML includes a set of graphic notation techniques to create visual models of objectoriented software-intensive systems. The Unified Modeling Language is used to specify, visualize, modify, construct and document the artifacts of an object-oriented software-intensive system under

development.UML offers a standard way to visualize a system's architectural blueprints.

Goals of UML
The primary goals in the design of the UML were:

Provide users with a ready-to-use, expressive visual modeling language so they


can develop and exchange meaningful models.

Provide extensibility and specialization mechanisms to extend the core concepts. Be independent of particular programming languages and development processes. Provide a formal basis for understanding the modeling language. Encourage the growth of the OO tools market. Support higher-level development concepts such as collaborations, frameworks,
patterns and components.

Integrate best practices.

26

3.2

UML Diagrams

3.2.1 Usecase Diagram


A usecase diagram in the Unified Modeling Language (UML) is a type of behavioral diagram defined by and created from a Use-case analysis. Its purpose is to present a graphical overview of the functionality provided by a system in terms of actors, their goals, and any dependencies between those use cases. Interaction among actors is not shown on the use case diagram. If this interaction is essential to a coherent description of the desired behavior, perhaps the system or use case boundaries should be re-examined. Alternatively, interaction among actors can be part of the assumptions used in the use case. Use cases A use case describes a sequence of actions that provide something of measurable value to an actor and is drawn as a horizontal ellipse. Actors An actor is a person, organization, or external system that plays a role in one or more interactions with the system. System boundary boxes (optional) A rectangle is drawn around the use cases, called the system boundary box, to indicate the scope of system. Anything within the box represents functionality that is in scope and anything outside the box is not.

27

Fig.3.2.1 Usecase diagram

Fig.3.2.2 Usecase diagram

28

Fig.3.2.3 Usecase diagram

29

3.2.2 Sequence Diagram


A sequence diagram in Unified Modeling Language (UML) is a kind of interaction diagram that shows how processes operate with one another and in what order. It is a construct of a Message Sequence Chart. Sequence diagrams are sometimes called event diagrams, event scenarios, and timing diagrams. A sequence diagram shows, as parallel vertical lines (lifelines), different processes or objects that live simultaneously, and, as horizontal arrows, the messages exchanged between them, in the order in which they occur.

USES Sequence Diagram


Some systems have simple dynamic behavior that can be expressed in terms of specific sequences of messages between a small, fixed number of objects or processes. In such cases sequence diagrams can completely specify the system's behavior. Often, behavior is more complex, e.g. when the set of communicating objects is large or highly variable, when there are many branch points (e.g. exceptions), when there are complex iterations, or synchronization issues such as resource contention. In such cases, sequence diagrams cannot completely describe the system's behavior, but they can specify typical use cases for the system, small details in its behavior, and simplified overviews of the behavior.

30

Fig.3.2.3 Sequence diagram

3.2.3 Collaboration Diagram


31

A collaboration diagram, also called a communication diagram or interaction


diagram, is an illustration of the relationships and interactions among software objects in the Unified Modeling Language (UML).

The concept is more than a decade old although it has been refined as modeling
paradigms have evolved. A collaboration diagram resembles a flowchart that portrays the roles, functionality and behavior of individual objects as well as the overall operation of the system in real time.

Objects are shown as rectangles with naming labels inside. These labels are preceded
by colons and may be underlined. The relationships between the objects are shown as lines connecting the rectangles.

Communication diagrams show a lot of the same information as sequence diagrams,


but because of how the information is presented, some of it is easier to find in one diagram than the other. Communication diagrams show which elements each one interacts with better, but sequence diagrams show the order in which the interactions take place more clearly.

Fig.3.2.4 Collaboration diagram


32

3.2.4 Class Diagram


In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, and the relationships between the classes. In the class diagram these classes are represented with boxes which contain three parts. A class with three sections The upper part holds the name of the class The middle part contains the attributes of the class The bottom part gives the methods or operations the class can take or undertake

In the system design of a system, a number of classes are identified and grouped together in a class diagram which helps to determine the static relations between those objects. With detailed modeling, the classes of the conceptual design are often split into a number of subclasses. In order to further describe the behavior of systems, these class diagrams can be complemented by state diagram or UML state machine. Also instead of class

diagrams Object role modeling can be used if you just want to model the classes and their relationships

33

Fig.3.2.5 Class diagram

3.2.5 Activity Diagrams


Activity diagrams are graphical representations of workflows of stepwise activities and actions with support for choice, iteration and concurrency. In the UML, activity diagrams can be used to describe the business and operational step-by-step workflows of components in a system. An activity diagram shows the overall flow of control. Activity diagrams are constructed from a limited number of shapes, connected with arrows. The most important shape types:

rounded rectangles represent activities; diamonds represent decisions; bars represent the start (split) or end (join) of concurrent activities; a black circle represents the start (initial state) of the workflow; an encircled black circle represents the end (final state).
34

Arrows run from the start towards the end and represent the order in which activities happen. Hence they can be regarded as a form of flowchart. Typical flowchart techniques lack constructs for expressing concurrency. However, the join and split symbols in activity diagrams only resolve this for simple cases; the meaning of the model is not clear when they are arbitrarily combined with decisions or loops.

Fig.3.2.6 Activity diagram

35

Das könnte Ihnen auch gefallen