Docsity

Understanding Unified Modeling Language (UML) through Use Cases and Class Diagrams, Slides of Software Engineering

Partial preview of the text

Download Understanding Unified Modeling Language (UML) through Use Cases and Class Diagrams and more Slides Software Engineering in PDF only on Docsity!

Unified

Modeling

Language

(UML)

Outline

๏‚—

Unified

Modeling

Language

(UML)

๏‚—

Principles

and

Concepts

๏‚—

Modeling

Requirements

with

Use

Cases

๏‚—

Modeling

Relations

and

Structures

with

Class

Diagrams

Why

We

Model

๏‚—

We

build

models

so

that

we

can

see

and

better

understand

the

system

we

are

developing.

What

is

UML?

๏‚—

UML

is

a

language

for

๏‚—

Visualizing ๏‚—

Specifying ๏‚—

Constructing ๏‚—

Documenting

Modeling

Requirements

with

Use

Cases

๏‚—

Use

cases

describes

the

externally

observable

behavior

of

system

functions

in

the

form

of

interactions

between

the

system

to

be

developed

and

the

external

entities

Actors

๏‚—

Actors

may

represent

roles

played

by

users

of

the

system

or

other

systems.

๏‚—

Consist

of

a

name

and

scenarios

Use

Case

Diagram

๏‚—

Consist

of:

๏‚—

Use

cases

๏‚—

Actors ๏‚—

Relationships

among

actors

and

use

cases

Use

case

Diagram

ATM

๏‚—

Use

case

diagram

for

the

shown

functionality.

Balance status

report

Withdraw cash

Validation

<>

Customer

<>

ATM

Another Example - High Level Use Case Diagram

Manage Resources

Manage Projects

System Admin

Resource Manager Project Manager

System Administrator

Use

case

Description

๏‚—

Generic format for documenting the use case:^ ๏‚—

Pre condition:

If any

๏‚—^

Use case

:^

Name of the case.

๏‚—^

Actors

:^

List of actors(external agents), indicating whoinitiates the use case.

๏‚—^

Purpose

:^

Intention of the use case.

๏‚—^

Overview

:^

Description.

๏‚—^

Type

:^

primary / secondary.

๏‚—^

Post condition:

If any

๏‚—

Typical Course of Events: ACTOR ACTION

:^

Numbered actions of the actor.

SYSTEM RESPONSE

:^

Numbered description of system responses.

Class

Diagrams

UML

Notation

for

Classes

ClassName

The

top

compartment

shows

the

class

name.

field

1 โ€ฆ field

n

The

middle

compartment

contains

the

declarations

of

the

fields

of

the

class.

method

1

method

m

The

bottom

compartment

contains

the

declarations

of

the

methods

Visibility

syntax

UML

Visibilty

UML Syntax

public

protected

package

~

private

Aggregation

and

Compositon

๏‚—

Aggregation

is

a

special

form

of

association

๏‚—

Has

โ€a

or

part

โ€whole

relationship

๏‚—

Composition

is

a

stronger

form

of

aggregation

University

Department

Faculty

Chairman-of

Member-of

College

Student

1

1

1 1

1 1

1..*

Composition

Aggregation

Dependency

๏‚—

Dependency

is

a

relationship

between

entities

such

that

the

proper

operation

of

one

entity

depends

on

the

presence

of

the

other

entity,

and

changes

in

one

entity

would

affect

the

other

entity.

Registrar

void

addCourse(CourseSchedule

a,

Course

c)

void

removeCourse(CourseSchedule

Course

findCourse(String

title)

void

enroll(Course

c,

Student

s)

void

drop(Course

c,

Student

s

CourseSchedule

Course Student