33
S Chapter 5 System Modeling 1

Chapter 5 System Modeling 1. Context Model Shows context (environment) of proposed system Other software People Roadmap of major areas to consider

Embed Size (px)

Citation preview

Page 1: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

S

Chapter 5 System Modeling

1

Page 2: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Context Model

Shows context (environment) of proposed system Other software People

Roadmap of major areas to consider

Other software systems Supplying data Using Data Sharing data Offering services User interface

2

Page 3: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Context

3

Page 4: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Process UML Activity Diagram

Show activities of a system

Symbology Filled circle – start of a process Rounded boxes – activities Arrows - flow Bars –

Full completion of predecessors needed successors occur in parallel

4

Page 5: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Process – UML Activity Diag.

5

Page 6: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Use Case Modeling

Each use case is a discrete task

Actors (stick figures) People Programs

Activity

Tabular description

6

Page 7: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Use Case

7

Page 8: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Use Case - textual

8

MHC-PMS: Transfer data

Actors Medical receptionist, patient records system (PRS)

Description A receptionist may transfer data from the MHC-PMS to a general patient record database that is maintained by a health authority. The information transferred may either be updated personal information (address, phone number, etc.) or a summary of the patient’s diagnosis and treatment.

Data Patient’s personal information, treatment summary

Stimulus User command issued by medical receptionist

Response Confirmation that PRS has been updated

Comments The receptionist must have appropriate security permissions to access the patient information and the PRS.

Page 9: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Use - Case

Chapter 4 Requirements engineering9

Page 10: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Sequence Diagrams

Actors, objects in boxes at top

Dotted line denotes their timeline

Solid box denotes their activity

Arrows show interaction between activities

Time flow is top to bottom

10

Page 11: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Sequence Diagam

Chapter 4 Requirements engineering11

Page 12: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

12

Sequence Diagram

Page 13: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Sequence Diagrams

Web server access

Three tier model

FTP protocol

DHCP - Broadcast, Offer, Request, Acceptance

Web access/DNS

Chapter 4 Requirements engineering13

Page 14: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Activity

Home security system Window, door sensors Central security system Phone confirmation Dispatch Security officer

Chapter 4 Requirements engineering14

Page 15: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Class Diagrams

Define objects and object relationships

Box refers to a class

Line designates a relationship

Numbers identify quantity 1 – single * many

15

Page 16: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Class Diagrams

Chapter 4 Requirements engineering16

Page 17: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Class Detail

Name at top

Attributes next

Methods at bottom

17

Page 18: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Class Detail

Chapter 4 Requirements engineering18

Page 19: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Generalization hierarchy

Class hierarchy

Root represents base class, most common definition

Branches add attributes, operations

19

Page 20: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Class Hierarchy

20

Page 21: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Class Hierarchy - detailed

21

Page 22: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Example

Real Estate Property Residential Commercial Land

Chapter 4 Requirements engineering22

Page 23: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Data Driven Modeling

Processes are driven by data that arrives

UML Activity Diagram

Chapter 4 Requirements engineering23

Page 24: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Data Driven Modeling

Chapter 4 Requirements engineering24

Page 25: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Event Driven Modeling

Models behavior in response to events

Especially in real-time and embedded control systems

Chapter 4 Requirements engineering25

Page 26: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

State Diagrams

Model event driven process

Notation Circles

indicate states May indicate action

Arcs indicate event trigger may indicate output

Chapter 4 Requirements engineering26

Page 27: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

State Diagram Example

Chapter 4 Requirements engineering27

Page 28: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

States

Chapter 4 Requirements engineering28

State Description

Waiting The oven is waiting for input. The display shows the current time.

Half power The oven power is set to 300 watts. The display shows ‘Half power’.

Full power The oven power is set to 600 watts. The display shows ‘Full power’.

Set time The cooking time is set to the user’s input value. The display shows the cooking time selected and is updated as the time is set.

Disabled Oven operation is disabled for safety. Interior oven light is on. Display shows ‘Not ready’.

Enabled Oven operation is enabled. Interior oven light is off. Display shows ‘Ready to cook’.

Operation Oven in operation. Interior oven light is on. Display shows the timer countdown. On completion of cooking, the buzzer is sounded for five seconds. Oven light is on. Display shows ‘Cooking complete’ while buzzer is sounding.

Page 29: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Events

Chapter 4 Requirements engineering29

Stimulus Description

Half power The user has pressed the half-power button.

Full power The user has pressed the full-power button.

Timer The user has pressed one of the timer buttons.

Number The user has pressed a numeric key.

Door open The oven door switch is not closed.

Door closed The oven door switch is closed.

Start The user has pressed the Start button.

Cancel The user has pressed the Cancel button.

Page 30: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

State Diagram

Graph structure

Can be characterized in tables – row contain State, trigger, new state

Chapter 4 Requirements engineering30

Page 31: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

State Diagrams - Examples

Fax decoding Data driven

Printer console Driven by buttons, internal sensors

Power Plant Control System

Stopwatch Stop, start Lap time

Chapter 4 Requirements engineering31

Page 32: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Example

Alarm clock Three buttons Set time Set alarms Enable/disable alarm Change display – clock or alarm time Power Failure

Chapter 4 Requirements engineering32

Page 33: Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider

Model Driven Engineering

Developer defines model

Implementation is automatically generated

Not in widespread use

Chapter 4 Requirements engineering33