Top Banner
1 The Unified Modeling Language
44

The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

Sep 22, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

1

The Unified Modeling Language

Page 2: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

2

The Unified Modeling Language

The Unified Modeling Language (UML) is a standard language for writing software blueprints. The UML may be used to visualize, specify, construct, and document the artifacts of a software­intensive system.

Grady Booch

James Rumbaugh (OMT)

Ivar Jacobson (OOSE)

Page 3: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

3

Building Blocks of UML

Things

Relationships

Diagrams

Page 4: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

4

Things

Structural things classes, interfaces, collaborations, use

cases, active classes, components, nodes.

Behavioral things interactions, state machines.

Grouping things packages.

Annotational things notes.

Page 5: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

5

Relationships

Dependency

Association

Generalization

Realization

Page 6: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

6

Diagrams

1. Class diagram

2. Object diagram

3. Use case diagram

4. Sequence diagram

5. Collaboration diagram

6. Statechart diagram

7. Activity diagram

8. Component diagram

9. Deployment diagram

Page 7: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

7

Structural Things

Structural things are the nouns of UML models. These are the mostly static parts of a model, representing elements that are either conceptual or physical.

Page 8: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

8

Class

Class A class is a description of a set of objects that share

the same attributes, operations, relationships, and semantics.

Attribute An attribute is a named property of a class that

describes a range of values that instances of the property may hold.

Operation An operation is the implementation of a service that

can be requested from any object of the class to affect behavior.

Page 9: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

9

Use Case

Use case A use case specifies the behavior of a system or a

part of a system and is a description of a set of sequences of actions, including variants, that a system performs to yield an observable result of value to an actor.

Actor

An actor represents a coherent set of roles that users of use cases play when interacting with these use cases.

Page 10: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

10

Use Case Diagram

Use case diagram

A use case diagram shows a set of use cases and actors and their relationships.

Page 11: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

11

Interface

Interface An interface is a collection of operations that specify a

service of a class or component.

Register.exeBilling.exe

Billing

System

Page 12: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

12

Collaboration

Collaboration Cross between an symbol diagram and a sequence

diagram (interaction).

Describes a specific scenario

Numbered arrows show the movement of messages

during the course of a scenario

When to use a Collaboration Diagram When you prefer to show a spatial organization of

symbols and interaction rather than concentrating on the

sequence of the interaction

Page 13: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

13

Collaboration Diagram

Page 14: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

14

Node A node is a physical element that exists at run time

and represents a computational resource.

emCity

tornado

Student DB

Course

Scheduling

Enrollment

Page 15: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

15

Behavioral Things

Behavioral things are the dynamic parts of UML models. These are the verbs of a model, representing behavior over time and space.

Page 16: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

16

Behavioral Things (cont’d)

Interaction An interaction is a behavior that comprises a set of

messages exchanged among a set of objects within a particular context to accomplish a specific purpose.

State machine A state machine is a behavior that specifies the

sequences of states an object or an interaction goes through during its lifetime in response to events, together with its response to those events.

Page 17: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

17

Grouping and Annotational Things

Grouping things are the organizational parts of UML models.

Package A package is a general purpose mechanism for organizing

elements into groups.

Annotational things are the explanatory parts of UML models.

Note A note is simply a symbol for rendering constraints and

comments attached to an element or a collection of elements.

Page 18: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

18

Dependency

Dependency A dependency is a using relationship that states that a

change in specification of one thing may affect another thing that uses it, but not necessarily the reverse.

RegistrationManager

ScheduleAlgorithm

Page 19: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

19

Association

Association An association is a structural relationship that

specifies that objects of one thing are connected to objects of another.

Bank Teller Customerserves

Page 20: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

20

Aggregation

Aggregation An aggregation is a special form of association that

specifies a whole­part relationship between the aggregate (the whole) and a component (the part).

Course

CourseOffering

Page 21: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

21

Generalization

Generalization A generalization is a relationship between a general

thing and a more specific kind of that thing. Sometimes it is called an ''is­a­kind­of'' relationship.

Employment

Teller Manager

Page 22: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

22

Realization

Realization A realization is a semantic relationship between

classifiers, wherein, one classifier specifies a contract that another classifier guarantees to carry out.

Register.exeBilling.exe Billing System

<<interface>>

Page 23: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

23

Class and Object Diagram

Class diagram A class diagram shows a set of classes, interfaces,

and collaborations and their relationships.

Object diagram An object diagram shows a set of objects and their

relationships.

Page 24: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

24

Sequence Diagram

Sequence diagram

A sequence diagram is an interaction diagram that emphasizes the time­ordering of messages.

This diagram is a model describing how groups of objects collaborate in

some behavior over time.

The diagram captures the behavior of a single use case.

It shows objects and the messages that are passed between these objects

in the use case.

When to use a sequence diagram

A good design can have lots of small methods in different classes. Because

of this it can be difficult to figure out the overall sequence of behavior. This

diagram is simple and visually logical, so it is easy to see the sequence of

the flow of control.

A sequence diagram also clearly shows concurrent processes and

activations.

Page 25: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

25

Sequence Diagram

Page 26: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

26

State Chart Diagram

Statechart diagram A statechart diagram shows a state machine, consisting of

states, transitions, events, and activities.

Provides a very detailed picture of how a specific symbols changes states.

A state refers to the value associated with a specific attribute of an object and to any actions or side

effects that occur when the attribute’s value changes

When to use a State Diagram Used when you are working on real-time process control

applications or systems that involve concurrent processing

When you want to show the behavior of a class over several use cases

Page 27: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

27

State Chart Diagram

Page 28: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

28

Activity Diagram

Activity diagram

An activity diagram is a special kind of a statechart diagram that shows the flow from activity to activity within a system.

Page 29: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

29

Deployment Diagram A Deployment diagram shows the configuration of run-time processing elements

and the software components, processes, and objects. Software component

instances represent run-time manifestations of code units. Components that do

not exist as run-time entities do not appear on these diagrams. These

components should be shown on component diagrams.

Page 30: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

30

Component Diagram A component diagram shows the dependencies among software components,

including source code, binary code and executable components. Some

components exist at compile time, some exist at link time, and some exist at run

time; some exist at more than one time.

Page 31: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

31

Example

An University wants to computerize their registration system The Registrar sets up the curriculum for a semester

One course may have multiple course offerings

Students select 4 primary courses and 2 alternate courses

Once a student registers for a semester, the billing system is notified so the student may be billed for the semester

Students may use the system to add/drop courses for a period of time after registration

Professors use the system to receive their course offering rosters

Users of the registration system are assigned passwords which are used at logon validation

Page 32: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

32

Actors

An actor is someone or some thing that must interact with the system under development

Student

Registrar

Professor

Billing System

Page 33: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

33

Use Cases

use case is a pattern of behavior the system exhibits

Each use case is a sequence of related transactions performed by an actor and the system in a dialogue

Actors are examined to determine their needs

Registrar -- maintain the curriculum

Professor -- request roster

Student -- maintain schedule

Billing System -- receive billing information from registration

Maintain ScheduleMaintain Curriculum Request Course Roster

Page 34: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

34

Use Case Diagram

Student Professor

Maintain Schedule

Maintain Curriculum

Request Course Roster

Billing System

Registrar

Page 35: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

35

Sequence Diagram

StudentRecord StudentScheduleEnrollment courseOffering

StudentId

create studentSchedule

verifyPrerequisites

display studentSchedule

selectCourse

addCourse

prereqs met

prereqs not met

password verified

prerequisites

deny enrollment

getPrerequisites

checkEnrollment

space available

Student

prompt for password

password

display studentSchedule

select another course?

Course Enrollment

Page 36: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

36

Collaboration Diagram

: Registrar

course form : CourseForm

theManager : CurriculumManager

aCourse : Course

1: set course info2: process

3: add course

4: new course

Page 37: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

37

Classes

RegistrationForm

RegistrationManager

Course

Student

CourseOffering

Professor

ScheduleAlgorithm

Page 38: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

38

Classes

RegistrationForm

RegistrationManager

addStudent(Course, StudentInfo)

Coursename

numberCredits

open()

addStudent(StudentInfo)

Studentname

major

CourseOfferinglocation

open()

addStudent(StudentInfo)

Professorname

tenureStatus

ScheduleAlgorithm

Page 39: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

39

Relationships

RegistrationForm

RegistrationManager

Course

Student

CourseOffering

Professor

addStudent(Course, StudentInfo)

name

numberCredits

open()

addStudent(StudentInfo)name

major

location

open()

addStudent(StudentInfo)

name

tenureStatus

ScheduleAlgorithm

Page 40: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

40

Multiplicity and Navigation

RegistrationForm

RegistrationManager

Course

Student

CourseOffering

Professor

addStudent(Course, StudentInfo)

name

numberCredits

open()

addStudent(StudentInfo)major

location

open()

addStudent(StudentInfo)

tenureStatus

ScheduleAlgorithm

10..*

0..*

1

1

1..*4

3..10

0..41

Page 41: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

41

Inheritance

RegistrationForm

RegistrationManager

Course

Student

CourseOffering

Professor

addStudent(Course, StudentInfo)

name

numberCredits

open()

addStudent(StudentInfo)major

location

open()

addStudent(StudentInfo)

tenureStatus

ScheduleAlgorithm

name

RegistrationUser

Page 42: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

42

State Transition Diagram

InitializationOpen

entry: Register student

exit: Increment count

Closed

Canceled

do: Initialize course

do: Finalize course

do: Notify registered students

Add Student / Set count = 0

Add student[ count < 10 ]

[ count = 10 ]

Cancel

Cancel

Cancel

Page 43: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

43

Component Diagram

Course Course

Offering

Student Professor

Course.dll

People.dll

Course

User

Register.exeBilling.exe

Billing

System

Page 44: The Unified Modeling Language - Gunadarmalintang.staff.gunadarma.ac.id/Downloads/files/... · The Unified Modeling Language The Unified Modeling Language (UML) is a standard language

44

Deployment Diagram

Registration Database

Library

Dorm

Main Building