analysis modelling

Post on 15-Jun-2015

612 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Objectives of analysis model◦ To describe what the customer require◦ To establish a basis for the creation of a software

design◦ To define a set of requirements that can be

validated once the software is built.Uses a combination of text and diagrams to show

requirement

What is a model?◦ a model is a simplification of reality

Why do we model?◦ we build models so that we can better understand

the system we are developing◦ we build models of complex systems because we

cannot comprehend such a system in its entirety

Shows 3 aspects of a software :1. Data Modeling2. Functional Modeling3. Behavioral Modeling

Data Dictionary – A repository that contains description of all data objects consumed or produced by the software.

3 diagrams surround the core –1. ERD (Entity relationship diagram) – Depicts

relationship between objects.2. DFD (Data Flow diagram)- Shows how data is transformed as they move through the system.3. STD (State transition diagram) – Shows how a

system behaves as a consequence of external events.

Data Modeling :1.What are the primary data objects?2.What attributes describe the object?3.What are the relationships between each

objects?To answer these, data modeling methods make use of ERD--Defines all data that are entered, stored ,

transformed and produced within an application.

Functional Modeling(DFD)

external entityexternal entity

processprocess

data flowdata flow

data storedata store

Notations used

A producer or consumer of data Example: person, device, system, sensor

Data must always originate from somewhere, and must always be sent to something

Notations used :

A data transformer (changes input to output) Example: compute taxes, determine area, format report,

display graph

Data must always be processed in some way to achieve system function

Notations used

computecomputetriangle triangle

areaarea

basebase

heightheight

areaarea

Data flows through a system, beginning as input and be transformed into output

Data Store

look-uplook-upsensorsensor

datadata

sensor #sensor #

report requiredreport required

sensor #, type, sensor #, type, location, agelocation, age

sensor datasensor data

sensor numbersensor number

type, type, location, agelocation, age

Data is often stored for later use

Rules for drawing a DFD : All icons must be labeled with meaningful names The DFD evolves through a number of levels of detail Always begin with a context level diagram which

depicts the system as a single bubble (also called level 0)

Always show external entities at level 0 Always label data flow arrows Do not represent procedural logic DFD should be balanced. A data store cannot be connected either to another

data store or to an external entity.

Balancing of DFD

PPaa bb

xx yy level 0level 0

p1p1

p2p2

p3p3

p4p4 55

aa

bb

cc

ddee

ff

gglevel 1level 1

p

Extensions for real time systems.• To accommodate analysis of real time

software, we use extensions to basic DFD notations called Ward and Mellor Extensions.

Notations usedA data item that is input or output from a process on a time continous basis

A process that accepts control input or output.

A control flow/event

A data store that stores control information.

3. Behavioral modeling (State transition diagram)STDs represent----• Behavior of system by depicting it’s state.• Events that cause system to change state.• What actions are to be taken as a consequence of

a particular event?

State—a set of observable circumstances State—a set of observable circumstances that characterizes the behavior of a system that characterizes the behavior of a system at a given timeat a given time

State transition—the movement from one State transition—the movement from one state to anotherstate to another

Event—an occurrence that causes the Event—an occurrence that causes the system to exhibit some predictable form of system to exhibit some predictable form of behaviorbehavior

Action—process that occurs as a Action—process that occurs as a consequence of making a transitionconsequence of making a transition

State Transition Diagram Notation

statestate

new statenew state

event causing transitionevent causing transitionaction that occursaction that occurs

ExampleConsider an XYZ project which has a type of

sensor to measure air temperature.The sensor continuously sends out one of the

three signals HIGH, NORMAL, LOW.If the temperature signal is high then AC is

turned ON.If it is low then heater is turned ON.The air conditioner/ heater is turned OFF

when the temperature is NORMAL.

Example STD for a temperaturesensor

HOFF

AOFF

HON

AOFF

HOFF

AON

LOW

HON

HIGH

AON

HIGH

є

LOW

є

NORMAL

HOFF

NORMAL

AOFF

NORMAL

є

Mechanics of structured analysis :1. Create an ER diagram.2. Create a DFD diagram.3. Create a control flow model

• Large class of applications are driven by events.• Such applications require the use of control flow

modeling in addition to data flow modeling.

4. Create a control specification.Represents the behavior of the system.a. Contains a STD.b. Contains a process activation table (PAT) which contains

which processes will be invoked when an event occurs.Eg: Input events Temp High 1 0 0 Temp Normal 0 1 0 Temp Low 0 0 1 Process Activation

ACOn Hoff 1 0 0Hoff Aoff 0 1 0ACOff Hon 0 0 1

5. Create a Process Specification(PSPEC)• Used to describe all flow model processes that appear at the final level of refinement.• Contents of PSPEC can be a narrative text,

algorithm, table etc.

Process Specification (PSPEC) can be used to specify the processing details implied by a process within a DFDCheck & Check &

convert convert pressurepressure

PSPECPSPEC

If absolute tank pressure > max pressure then set above pressure to “true”;else set above pressure to “false”; begin conversion algorithm x-01a; compute converted pressure; endend if

• A repository of data in a system• It enables to find answers to the following

questions.DD contains 2 types of descriptions for the

data flowing through the system-1. Data elements2. Data structures

1. Data Element The most fundamental unit of data.Eg. Invoice no, Amount due etc.Describing data elementsData elementDescriptionTypeLengthAliasesRange of valuesTypical valueOther details

Eg. Data element : Employee no. Description : Identifies each employee in

the organization Type : Alphanumaric

Length : 7 Aliases : Empid

Range of values : NA Typical value : AC41000

Other details : Employee no. includes a 5 digit no. and department prefix.

Valid prefixes AC Accounting

AD Advertising RD Research and development

2. Data Structures Set of data items that are related to each

other. Eg. Pay Cheque-- Date Amount Pay to Account no.

4 types of relationship exists between components of a data structure.

1. Sequence relationship.Defines the set of data items that make up a data structure.

eg. Student university record consists ofName

First NameMiddle NameLast name

Street AddressCityStateTelephone no.Use the symbol -- +

2. Selection relationshipRepresents either/or relationship.i.e a choice of one item must be made from a set of 2/more

items.Eg. Student data structure

eg. Student data structure NameStreet AddressCityStateTelephone no.and one of the followingStudent No.Social Security no.Write options in [ ] , each option separated by I (vertical line)

3. Iteration relationship (Repetition)Data elements composing the data structure are repeated

zero/one/more times.Eg. Term registration data structureTermYearAdvisor1 to 6 iteration of courseCourse no.Course nameTime DayInstructorNotation : All iteration data elements are shown in { }n

n-no. of iterations.

4. Optional relationshipElements which may or may not be included.

First NameMiddle NameLast name

Where middle name could be optionalNotation - ( )

Eg :Student data = Name + street address +city

+state +postal code + [Student No. I SS no]+{Course no + Course name + time + day + Instructor} + Term + year + advisor

Name =First Name + (Middle Name) + Last name

top related