1 swe 205 - introduction to software engineering lecture 15 – system modeling using uml

21
1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML

Post on 21-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

1

SWE 205 - Introduction to Software Engineering

Lecture 15 – System Modeling

Using UML

2

Lecture Objectives Describe the basic UML notation

associated with analysis; and Introduce new types of analysis objects.

Discuss inputs for Design Model.

3

Aims of Analysis Model To provide a ‘logical model’ of the

system, in terms of: Classes Relationships

‘How to get the thing right, now and in the future’?

4

Producing an Analysis Model Draft initial class diagram Re-examine behavior in use cases and

objects Refine class diagram Execute check Revise class diagram Group classes into packages

5

Analysis Model Inputs & Outputs

Inputs Use cases and use case models

Outputs Class roles and responsibilities [text] Use case description in terms of classes

and operations [text + use case] Completed analysis model [class and

package diagram]

6

Classes in UML

Class Name

Attribute name : Type

Operation name (parameter type) : result type

Class Name

7

Objects in UML

objectName: className

Attribute name : type = value

(same operations for all instances of a class)

objectName: className

Display (on: Surface)Rotate (angle: integer)

8

UML Generalization

9

Associations in UML

10

Class Diagram in UML Class diagrams

Show logical, static structure of system Provide core of ‘unified model’

Generation of initial class diagram from problem domain object list Classes of objects Associations / attributes Inheritance relationships

11

Initial Class Diagram - Example

12

Exploiting Use Cases Employ classes and use cases, one by

one To describe roles and responsibilities of

each class To distribute behavior specified in use

cases To ensure that there is a class for every

behavior

13

Roles of Classes Interface classes

For everything concerned with system interfaces Entity classes

For persistent information and behavior coupled to it.

Control classes For functionality not normally tied to other classes

14

Roles of Classes Integrated into UML as stereotypes

15

Interface Classes Contains functionality directly

dependent on system environment Definition focuses on interaction

between actor and use cases

16

Interface Classes

17

Entity Classes and their Attributes

Purposes of entity classes: To store information persisting after

completion of a use cases To define behavior for manipulating this

information.

18

Entity Classes and their Attributes

19

Packages Packages are necessary

Because of large numbers of classes To provide optional functionality To minimize effect of change

Packages should have a Tight functional coupling

Packages my contain nested packages

20

Example – Recycling Packages

21

Key points Analysis Model Outputs

Class roles Use case description in terms of classes Completed analysis model Sub-system diagrams