Beruflich Dokumente
Kultur Dokumente
Markus Paller
25.3.2015
Inhalt
Sequenzdiagramm .............................................................................................................................................. 2
Szenario .......................................................................................................................................................... 2
Geschftsprozess und Szenario ....................................................................................................................... 2
Notation Szenario ........................................................................................................................................ 2
Sequenzdiagramm .......................................................................................................................................... 2
Classes ................................................................................................................................................................ 3
Introduction.................................................................................................................................................... 3
Constructive steps to identify classes .............................................................................................................. 3
Analytical steps to validate classes ................................................................................................................... 3
Associations ........................................................................................................................................................ 4
Goal ................................................................................................................................................................ 4
Constructive Steps to Identify Associations ..................................................................................................... 4
Analytical Steps to Validate Associations ........................................................................................................ 4
Analysis Pattern .................................................................................................................................................. 5
General ........................................................................................................................................................... 5
List Pattern ..................................................................................................................................................... 5
Copy Type Exemplartyp ............................................................................................................................... 6
Construction Group Baugruppe.................................................................................................................... 6
List of Components Stckliste ...................................................................................................................... 7
Coordinator Type ............................................................................................................................................ 7
Group ............................................................................................................................................................. 8
Group History ................................................................................................................................................. 8
History Type ................................................................................................................................................... 9
Role ................................................................................................................................................................ 9
Alternating Role ............................................................................................................................................ 10
Beispiele ........................................................................................................................................................... 11
Sequenzdiagramme ...................................................................................................................................... 11
Test-Beispiel: ............................................................................................................................................ 12
Design Pattern .............................................................................................................................................. 13
Alternating Role........................................................................................................................................ 13
Copy Type................................................................................................................................................. 14
List Pattern ............................................................................................................................................... 14
Construction Group .................................................................................................................................. 14
Group ....................................................................................................................................................... 15
Test-Beispiele ........................................................................................................................................... 15
Test-Fragen................................................................................................................................................... 16
SYP Zusammenfassung
Markus Paller
Seite 1 von 16
Sequenzdiagramm
Szenario
Notation Szenario
Sequenzdiagramm
Zwei Dimensionen
o Vertikal: Zeit
o Horizontal: Objekte
Objekt
o Objektsymbol
o Vertikal gestrichelte Linie (Objektlinie)
Bedingung
o [<Bedingung>] Operation()
Wiederholung
o *Operation()
o *[Bedingung] Operation()
SYP Zusammenfassung
Markus Paller
Seite 2 von 16
Classes
Introduction
Class Diagram
o Static model
o Showing
Classes (attributes)
Associations
Inheritance
o Operations will be added after the diagram is established
Separate Class Diagram for each Use Case
Model creation is based on the appropriate Abstraction Level
Base Information material for identification of classes
o Use Cases
o Formulars describing a working process
o Lists
o Documents
Analysis of Documents
o Attributes gathered to classes
o Bottom-up Method
Class = Unity of Attributes
o Find associations
Description of Use Cases
o Top-down Method
Find classes and then the attributes
o What are candidates for classes (nouns)
Classification by Categories
o A person can have several roles in a system
Each role is a class
o Actions that store Data
Money transaction in a bank
o Further Categories
Things, Organisations, Container, Catalogue, Event, Contracts
Class Name
o Make a class diagram understandable
o Express the sum of all attributes
Degree of Abstraction
o Neither too many nor too few numbers of classes
o Define class methods, that belong to all methods
SYP Zusammenfassung
Markus Paller
Seite 3 von 16
Associations
Goal
Find the necessary associations in a Use Case that its Objects can accept their responsibilities
Just draw lines between classes
Find the multiplicities of the associations
Specify the associations
o Simple association
o Aggregation/Composition
SYP Zusammenfassung
Markus Paller
Seite 4 von 16
Analysis Pattern
General
Analysis Pattern
o Conceptional model which
Describes the solution of problems that behave similarly
Is a set of object and their unchangeable responsibility
List Pattern
SYP Zusammenfassung
Markus Paller
Seite 5 von 16
SYP Zusammenfassung
Markus Paller
Seite 6 von 16
Association is a composition
Aggregation object as well as its parts must be treated as a unity (copy, delete)
It must be possible to treat each object within the unity as individual objects
Multiplicity: 0..1
An object of type A can be composed of objects of type A, B and C
Coordinator Type
SYP Zusammenfassung
Markus Paller
Seite 7 von 16
Group
Group History
SYP Zusammenfassung
Markus Paller
Seite 8 von 16
History Type
Simple Associations
For each object all activities have to be modelled
For each activity the time period has to be registered
Object associations between employee and activities will evolve as long as the affiliation
exists. The restriction indicates what activity is active at the moment
Role
Between two classes there are two or even more simple association links
An object can play different roles in relation to objects of another class
Objects playing different roles have the same attributes and often the same methods
SYP Zusammenfassung
Markus Paller
Seite 9 von 16
Alternating Role
Ein Objekt der realen Welt kann zu verschiedenen Zeiten verschiedene Rollen spielen, in
jeder Rolle kann es unterschiedliche Eigenschaften und Operationen besitzen
Die unterschiedlichen Rollen werden mittels Vererbung modelliert
Objektverbindungen zwischen den Objekten und seinen Rollen werden nur erweitert, d.h.
weder gelscht, noch zu anderen Objekten aufgebaut
Aufgabenstellung:
Ein registrierter Arzt bt im ersten und zweiten Halbjahr 1998 in unterschiedlichen Praxen
jeweils eine Ttigkeit als angestellter Arzt aus. Mit 1.1.1999 herhlt er eine Zulassung.
Anmerkungen
Fr angestellte rzte sind teilweise andere Informationen zu speichern, als fr die
zugelassenen.
Die Informationen sind ber einen Zeitraum festzuhalten.
Neurztliche Ttigkeiten sind zu einem registrierter Arzt immer nur hinzuzufgt.
SYP Zusammenfassung
Markus Paller
Seite 10 von 16
Beispiele
Sequenzdiagramme
SYP Zusammenfassung
Markus Paller
Seite 11 von 16
Test-Beispiel:
Auf einer Online-Plattform (Forum) knnen Fragen an alle User gestellt werden, die gerade online
sind. Eine Zentrale (Server) verwaltet smtliche User. Wenn jemand eine Frage an das Forum stellt,
prft die Zentrale, wer online ist und gibt die Frage an die Online-User weiter. Die Frage soll so vom
Forum beantwortet werden.
Zeichne das Sequenzdiagramm und das Klassendiagramm.
SYP Zusammenfassung
Markus Paller
Seite 12 von 16
Design Pattern
Alternating Role
Problem:
Ein Professor unterrichtet whrend der Schulzeit an einer HTL. Daher hat er auch Ferien. Allerdings
arbeitet er auch zustzlich als Kursleiter am WIFI und hat dort spezielle Kursarten. Prinzipiell hat der
Professor ein Fachgebiet, auf dem er spezialisiert ist.
Anmerkungen:
Fr den Kursleiter sind teilweise andere Informationen zu speichern, als fr den HTL
Professor.
Die Informationen sind ber einen Zeitraum festzuhalten.
Das Fachgebiet ist zu einem Professor immer nur hinzugefgt.
SYP Zusammenfassung
Markus Paller
Seite 13 von 16
Copy Type
Problem:
Ein Softwareunternehmen hat ein Programm entwickelt. Dieses Programm hat eine eindeutige
Softwarenummer, einen Autor als Programmentwickler und ein Release Datum.
Von diesem Programm werden Kopien <Exemplare> verkauft. Daher knnen wir die Eigenschaften
vom Programms von den Kopien trennen.
Lsung:
List Pattern
Problem:
A country (Staat) consist of general country information and the individual federal states
(Bundeslnder). A federal state does not exist without a country. General country information belong
to any federal state.
Solution:
Construction Group
Problem:
A computer consists of exactly one motherboard and four fans (Lfter, physical inclusion).
Solution:
SYP Zusammenfassung
Markus Paller
Seite 14 von 16
Group
Problem:
We talk about a group, i.e. if animals belong to a herd (Rudel). Several individual objects (animals)
belong at a certain time slice to the same group object (herd).
Solution:
Test-Beispiele
Auf einer Palette sind mehrere Fsser. Paletten werden im Normalfall komplett geliefert und im
Normalfall komplett weiterverkauft. Es knnen jedoch auch einzelne Fsser verkauft werden. Lee-re
Paletten und einzelne Fsser knnen nicht vorkommen. Jede Palette hat eine Nummer.
Jedes Projekt hat genau einen Projektleiter, der fr mehrere Projekte verantwortlich sein kann. Die
meisten Programmierer arbeiten fr mehrere Projekte. Einige Programmierer sind gleichzeitig
Projektleiter eines anderen Projektes. Ein Programmierer kann aber nicht gleichzeitig Projektleiter
von ein und demselben Projekt sein.
Ein Verlage gibt ein Serie von Bchern heraus (Buchreihe), die zu einem bestimmten Thema gehren. Die Klassen sind mit mindestens 1 Attribut zu versehen.
SYP Zusammenfassung
Markus Paller
Seite 15 von 16
Test-Fragen
Give the characteristics of a Coordinator-Type pattern!
Since all his activities during his affiliation are important, they have to be maintained as long
as the employee belongs to the company.
SYP Zusammenfassung
Markus Paller
Seite 16 von 16