Top Banner
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.

Dec 21, 2015

Download

Documents

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: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

1

SWE 205 - Introduction to Software Engineering

Lecture 15 – System Modeling

Using UML

Page 2: 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.

Page 3: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

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’?

Page 4: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

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

Page 5: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

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]

Page 6: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

6

Classes in UML

Class Name

Attribute name : Type

Operation name (parameter type) : result type

Class Name

Page 7: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

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)

Page 8: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

8

UML Generalization

Page 9: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

9

Associations in UML

Page 10: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using 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

Page 11: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

11

Initial Class Diagram - Example

Page 12: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

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

Page 13: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

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

Page 14: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

14

Roles of Classes Integrated into UML as stereotypes

Page 15: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

15

Interface Classes Contains functionality directly

dependent on system environment Definition focuses on interaction

between actor and use cases

Page 16: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

16

Interface Classes

Page 17: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

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.

Page 18: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

18

Entity Classes and their Attributes

Page 19: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

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

Page 20: 1 SWE 205 - Introduction to Software Engineering Lecture 15 – System Modeling Using UML.

20

Example – Recycling Packages

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

21

Key points Analysis Model Outputs

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