Top Banner
UML FOR DOMAIN MODELS (Reference: Jason Roff – UML Beginner’s Guide)
27

(Reference: Jason Roff – UML Beginner’s Guide). Grady Booch, Ivar Jacobson, Jim Rumbaugh Standard method of creating diagrams and modeling system.

Dec 28, 2015

Download

Documents

Randolf Bell
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: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

UML FOR DOMAIN MODELS(Reference: Jason Roff – UML Beginner’s Guide)

Page 2: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

UNIVERSAL MODELING LANGUAGE (UML) Grady Booch, Ivar Jacobson, Jim

Rumbaugh Standard method of creating diagrams

and modeling system architectures There are 14 Diagrams Types

7 Diagram Types are “Structural” 7 Diagram Types are “Dynamic”

Page 3: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

CLASSES

Box Top section is class name Second section is class attributes (data

members) Third section is class member functions

Notation + public access - private access # protected access

Page 4: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

A UML CLASS DIAGRAM FOR COURSE

Course

-enrollmentLimit-nEnrolledStudents-startTime-endTime-instructor

+getInstructor()+getStartTime()+getDuration()

Page 5: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

ATTRIBUTE FORMAT

-enrollmentLimit:Integer = 20-nEnrolledStudents: Integer=0-startTime: Date-endTime: Date-instructor: String-meetingDays[1..7]: Integer-/meetingHoursWeek:float

Page 6: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

CLASS RELATIONSHIPS

Show relationships with line and association name.

Professor

Student

teaches >

takes

>

Course

Page 7: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

MULTIPLICITY

Professor Course1 1..*

Professors teach 1 or more courses.Courses have exactly one professor.

teaches >

Page 8: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

ROLES

Professor Course1 1..*

teaches >

Instructor

Graduate Student

0..*

0..*Teaching Assistant grades >

Page 9: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

CLASS INSTANCES (OBJECTS)

Objects are differentiated from class with an underline and a class name qualifier

Course:Cs350

-enrollmentLimit = 20-nEnrolledStudents = 24-startTime : 14:00-endTime: 14:50-instructor: Ribler

Page 10: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

INHERITANCE (EMPTY ARROW)

Empty arrow points to base class (superclass) from derived class (subclass)

Person

Professor

Student Tutor

Teaching Assistant

Page 11: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

Car Class

COMPOSITION AND AGGREGATION

Engine Class

Composition is expressed with a filled diamond.Aggregation is expressed with a unfilled diamond.

List Class

Sprite Class

Page 12: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

ACTIVITY DIAGRAMS

Model workflows for use-cases (analysis)

Model object behavior (design)

Page 13: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

SYMBOLS

Start Symbol

End Symbol

Activity Symbol (contains action name)

Name of Action

Decision Points

Page 14: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

GUARDS WITH DECISION POINT

Create File Update File

[new file] [file already

exists]

Page 15: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

GUARD WITHOUT DECISION POINT

Create File Update File

[new file] [file already

exists]

Record Data

Page 16: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

EVENTS AND TRIGGERS

Indicators that an action has taken place

Ready

Print File

Save File

Create New File

Print(File, Printer)

SaveAs(Filename)

CreateNew(Filename)

Page 17: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

FORKS

Show concurrency Login

Load Grades Load Classes

Page 18: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

JOINS

Load Grades Load Classes

Display Data

Page 19: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

SWIM LANES

TelephoneOperator

POS SystemDatabase Wrapper

Determine Type

Load Inventory

Purchase()

Display Error [failur

e]

Change Inventory

Store Inventory

Display Error [failur

e]

Page 20: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

SEQUENCE DIAGRAMS

Model interaction between active objects

Consist of two components Active objects Interactions between active objects

SpaceShip Shoot

Page 21: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

“LIFELINES” INDICATE ACTIVE OBJECTS

SpaceShip UFO

Shoot

X

X indicates the end of the objects life.

Page 22: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

CONDITIONS CAN BE PLACED ON MESSAGES INDICATE ACTIVE OBJECTS

SpaceShip UFO

Issue Warning[UFO in Range]

Page 23: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

MESSAGE ARROWS

Synchronous – Flow is suspended until return from the call. (filled arrow head)

Return – Synchronous message is no longer blocked.

Asynchronous – Non-blocking message. Sender doesn’t wait for reply.

Flat – synchronization is unspecified.

Page 24: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

CREATING AND DESTROYING OBJECTS

SpaceShip

Missile<<create>>

<<destroys>>X

Page 25: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

SEQUENCE DIAGRAMS USE ROUNDED RECTANGLES TO INDICATE STATE

SpaceShip UFO

Issue Warning[UFO in Range]

Under Threat

Surrender

Taken Prisoner

Imprisoned

Page 26: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

BRANCHING

SpaceShip UFO Asteroid

[in alien war]

[at peace]shoot

shoot

Page 27: (Reference: Jason Roff – UML Beginner’s Guide).  Grady Booch, Ivar Jacobson, Jim Rumbaugh  Standard method of creating diagrams and modeling system.

USERS CAN BE DRAWN AS STICK FIGURES

ATM

Login

Prompt for transaction type

Logged in