Docsity

Unified Modeling Language-Software Engineering-Lab Manual, Lecture notes of Software Engineering

Partial preview of the text

Download Unified Modeling Language-Software Engineering-Lab Manual and more Lecture notes Software Engineering in PDF only on Docsity!

Unified

Modeling

Language

(UML)

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

What

is

Class

diagram?

 A

class

diagram

shows

the

existence

of

classes

and

their

relationships

in

the

logical

view

of

a

system

 UML

modeling

elements

in

class

diagrams

are:

Classes

,^ their

structure

and

behavior.

relationships

components

among

the

classes

^

association

^

aggregation

^

composition

^

Dependency

^

Inheritance

Multiplicity

or

cardinality

Visibility

syntax

UML

Visibilty

UML Syntax

public

protected

package

private

Class

Diagram

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

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

What

is

Cardinality?

:

Definition:

Number

of

instances

of

each

class

involved

in

the

dialogue

is^

specified

by

cardinality.

^

Common

multiplicity

values:

^

Symbol

Meaning

^

1

One

and

only

one

^

0..

Zero

or

one

^

M…N

From

M

to

N

(natural

integer)

^

0..*

From

zero

to

any

positive

integer

^

1..*

From

one

to

any

positive

integer

Class

Diagram

SavingAccount

<>AccountAccessor TellerScreen

ATMScreen

CashierStationBankAssociates

person <>

Cash BatchJob

NoteHelpForBankCard

ATMSystemBankComputer

Area

BankCard

Bank[Branch]

11 1..1..

Customer

11 0..10..

11

<>Account

1

1

1

1

(^11) 1..1..

Transaction

1

1..*

1

1..*Slips

CurrentAccount

Appendix ^

Association:^ ^

A^

relationship

between

objects

that

is

not

whole

‐part

i.e.

A

contains

a^

reference

of

B^

and

uses

B^

through

the

reference

^

Generally

implemented

as

a^

public

property

of

A,

where

B^

may

be

set

in

to

A

by

an

external

party.

^

Dependency:^ ^

A^

week

association,

where

A

doesn’t

contain

a^

reference

of

B^

but

uses

B

^

Generally

implemented

as

method

parameter

in

A

^

Composition:^ ^

A^

strong

whole

‐part

relationship,

i.e.

B^

(child)

has

no

existence

outside

A

(parent)

^

A^

creates

and

contains

B

but

B

can

not

contain

A

B

must

not

be

visible

outside

of

A

since

if^

A^

dies,

B

must

die

^

Aggregation:^ ^

A^

week

whole

‐part

relationship,

i.e.

B

(child)

may

exist

exist

outside

A

(parent)

^

A^

contains

B^

but

B^

can

not

contain

A

^

B^

must

be

visible

outside

of

A

since

B

may

still

exist

when

A

dies

Generally

many

relationship