unit 4
Post on 19-Nov-2014
123 Views
Preview:
TRANSCRIPT
Unit – 4Unit – 4 Requirements Requirements EngineeringEngineering
Requirements Engineering Requirements Engineering TasksTasks
(A) Inception(A) Inception—ask a set of questions that establish —ask a set of questions that establish …… basic understanding of the problembasic understanding of the problem the people who want a solutionthe people who want a solution the nature of the solution that is desired, and the nature of the solution that is desired, and the effectiveness of preliminary communication and the effectiveness of preliminary communication and
collaboration between the customer and the developercollaboration between the customer and the developer(B) Elicitation(B) Elicitation—elicit requirements from all —elicit requirements from all
stakeholdersstakeholders(C) Elaboration(C) Elaboration—create an analysis model that —create an analysis model that
identifies data, function and behavioral identifies data, function and behavioral requirementsrequirements
(D) Negotiation(D) Negotiation—agree on a deliverable system —agree on a deliverable system that is realistic for developers and customersthat is realistic for developers and customers
(E) Specification(E) Specification—can be any one (or more) of the —can be any one (or more) of the following:following: A written documentA written document A set of modelsA set of models A formal mathematical modelA formal mathematical model A collection of usage scenarios A collection of usage scenarios A prototypeA prototype
(F) Validation(F) Validation—a review mechanism that looks for—a review mechanism that looks for errors in content or interpretationerrors in content or interpretation areas where clarification may be requiredareas where clarification may be required missing informationmissing information inconsistencies (a major problem when large products or inconsistencies (a major problem when large products or
systems are engineered)systems are engineered) conflicting or unrealistic (unachievable) requirements. conflicting or unrealistic (unachievable) requirements.
(G) Requirements management(G) Requirements management
Building the Analysis ModelBuilding the Analysis Model
Elements of the analysis modelElements of the analysis model Scenario-based elementsScenario-based elements
Functional—processing narratives for software Functional—processing narratives for software functionsfunctions
Use-case—descriptions of the interaction Use-case—descriptions of the interaction between an “actor” and the systembetween an “actor” and the system
Class-based elementsClass-based elements Class DiagramClass Diagram
Behavioral elementsBehavioral elements State diagramState diagram
Flow-oriented elementsFlow-oriented elements Data flow diagramData flow diagram
Class DiagramClass Diagram
Sensor
name/id type location area characteristics
identify() enable() disable() reconfigure()
State DiagramState Diagram
Reading Commands
System Status=“Ready”Display msg=“enter cmd”
Display status=steadyDo: poll user input panel
Do: read user inputDo: interpret user input
Data ModelingData Modeling
Analysis modeling often begins with data Analysis modeling often begins with data modeling.modeling.
The Data Modeling:-The Data Modeling:- examines data objects independently of examines data objects independently of
processingprocessing focuses attention on the data domainfocuses attention on the data domain creates a model at the customer’s level of creates a model at the customer’s level of
abstractionabstraction indicates how data objects relate to one indicates how data objects relate to one
anotheranother
What is a Data Object?What is a Data Object?
manipulated within the software (system)manipulated within the software (system)
——something that is described by a setsomething that is described by a setObjectObjectof attributes (data items) and that will be of attributes (data items) and that will be
Typical ObjectsTypical Objectsexternal entitiesexternal entities (printer, user, sensor)(printer, user, sensor)
thingsthings (e.g, reports, displays, signals) (e.g, reports, displays, signals) occurrences or eventsoccurrences or events (e.g., interrupt, alarm)(e.g., interrupt, alarm)
placesplaces (e.g., a warehouse) (e.g., a warehouse) structuresstructures (e.g., a file)(e.g., a file)
Data AttributesData Attributes
A data object contains a set of A data object contains a set of attributes that act as an aspect, attributes that act as an aspect, quality, characteristic, or descriptor of quality, characteristic, or descriptor of the objectthe object
object: automobileobject: automobileattributes:attributes: makemake modelmodel body typebody type priceprice options codeoptions code
What is a Relationship?What is a Relationship?
relationshiprelationship——indicates “connectedness”; indicates “connectedness”; a "fact" that must be "remembered" a "fact" that must be "remembered" by the system and cannot or is not computed by the system and cannot or is not computed or derived mechanicallyor derived mechanically
several instances of a several instances of a relationship can existrelationship can exist
objects can be related in objects can be related in many different waysmany different ways
Cardinality and ModalityCardinality and Modality
“ “ Cardinality is the specification of the Cardinality is the specification of the number of occurrences of one object that number of occurrences of one object that can be related to the number of can be related to the number of occurrences of another object”occurrences of another object”
“ “ The modality of a relationship is ‘0’ if there The modality of a relationship is ‘0’ if there is no explicit need for the relationship to is no explicit need for the relationship to occur or the relationship is optional. The occur or the relationship is optional. The modality is ‘1’ if an occurrence of the modality is ‘1’ if an occurrence of the relationship is mandatory.”relationship is mandatory.”
Flow-Oriented ModelingFlow-Oriented Modeling
Represents how data objects are Represents how data objects are transformed as they move through the transformed as they move through the systemsystemFlow Modeling NotationFlow Modeling Notation
external entityexternal entity
processprocess
data flowdata flow
data storedata store
Gane and Sarson Symbol Set
Description Yourdon Symbol Set
Data Source and Destination symbol depicts external entities or portrays source and destination of data flow.Origin or Destination
Basic DFD Symbols
Bubble/circle symbol may represent the whole system (context diagram), internal entity (physical DFD) or process (logical DFD) of a particular system.
Storage symbolrepresents data
storage where data are being stored.
It can also represent a view or portion of company’s database.
Data flow symbol indicates a flow of data or documents into or outside from the system; flow of data between the entities (in physical DFD) and flow of data between processes (in logical DFD).
or or
External EntityExternal EntityA producer or consumer of dataA producer or consumer of data
Examples: a person, a device, a sensorExamples: a person, a device, a sensorAnother example: computer-basedAnother example: computer-basedsystemsystem
Data must always originate somewhereData must always originate somewhereand must always be sent to somethingand must always be sent to something
ProcessProcessA data transformer (changes inputA data transformer (changes inputto output)to output)
Examples: compute taxes, determine area,Examples: compute taxes, determine area,format report, display graph format report, display graph Data must always be processed in some Data must always be processed in some way to achieve system functionway to achieve system function
Data FlowData Flow
Data flows through a system, beginningData flows through a system, beginningas input and be transformed into output.as input and be transformed into output.
computecomputetriangle triangle
areaarea
basebase
heightheight
areaarea
Data StoresData Stores
DataData is often stored for later use.is often stored for later use.
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 Flow Diagramming:Data Flow Diagramming:GuidelinesGuidelines
all icons must be labeled with all icons must be labeled with meaningful namesmeaningful names
the DFD evolves through a number the DFD evolves through a number of levels of detailof levels of detail
always begin with a context level always begin with a context level diagram (also called level 0)diagram (also called level 0)
always show external entities at always show external entities at level 0level 0
always label data flow arrowsalways label data flow arrows
(1) Constructing a Data Flow (1) Constructing a Data Flow ModelModel
review the data model to isolate data objects and review the data model to isolate data objects and use a grammatical parse to determine use a grammatical parse to determine “operations”“operations”
determine external entities (producers and determine external entities (producers and consumers of data)consumers of data)
create a level 0 DFDcreate a level 0 DFDLevel 0 DFD ExampleLevel 0 DFD Example
useruserprocessing processing
requestrequest
videovideosourcesource
video signalvideo signal
digitaldigitalvideovideo
processorprocessor
requestedrequestedvideovideosignalsignal
monitormonitor
Constructing LevelsConstructing Levels write a narrative describing the transformwrite a narrative describing the transform parse to determine next level transformsparse to determine next level transforms ““balance” the flow to maintain data flow balance” the flow to maintain data flow
continuitycontinuity develop a level 1 DFDdevelop a level 1 DFD
level level 11
PPaa bbxx yy
p1p1p2p2
p3p3p4p4 p5p5
aa
bb
cc
ddee
ff
gg
level 0level 0
Flow Modeling NotesFlow Modeling Notes
each bubble is refined until it does just each bubble is refined until it does just one thingone thing
the expansion ratio decreases as the the expansion ratio decreases as the number of levels increasenumber of levels increase
most systems require between 3 and 7 most systems require between 3 and 7 levels for an adequate flow modellevels for an adequate flow model
a single data flow item (arrow) may be a single data flow item (arrow) may be expanded as levels increase (data expanded as levels increase (data dictionary provides information)dictionary provides information)
DFDs: A Look AheadDFDs: A Look Ahead
Maps intoMaps intoanalysis modelanalysis model
design modeldesign model
DFD ExampleDFD Example In the following example, a DFD will be created based In the following example, a DFD will be created based
on a paragraph about ABC Records Co.’s method of on a paragraph about ABC Records Co.’s method of receiving and filling orders.receiving and filling orders.
In this example, the information necessary to create In this example, the information necessary to create the DFD is provided for us. In Real Life, this the DFD is provided for us. In Real Life, this information comes from extensive interviewing, information comes from extensive interviewing, document gathering, and other research.document gathering, and other research.
Depending upon the system being studied, the number Depending upon the system being studied, the number of people working on it, etc., the development of a of people working on it, etc., the development of a detailed DFD can take anywhere from a few hours to detailed DFD can take anywhere from a few hours to several months (paid for by your client with NO CODE several months (paid for by your client with NO CODE TO SHOW FOR IT). Yet it is a very standard and TO SHOW FOR IT). Yet it is a very standard and meaningful part of system documentation.meaningful part of system documentation.
DFD ExampleDFD ExampleABC Records is a mail-order company that distributes CDs and tapes at discount price to record-club members. When an order processing clerk receives an order form, he or she verifies that the sender is a club member by checking the Member file. If the sender is not a member, the clerk returns the order along with a membership application form. If the customer is a member, the clerk verifies the order item data by checking the Item file. Then the clerk enters the order data and saves it to the Daily Orders file. The clerk also prints an invoice and shipping list for each order, which are forwarded to Order Fulfillment.
DFD Example - Step 1DFD Example - Step 1
FIRST SENTENCEFIRST SENTENCE::ABC Records is a mail-order company that ABC Records is a mail-order company that
distributes CDs and tapes at discount price to distributes CDs and tapes at discount price to record-club members.record-club members.
RESULTRESULT: initial title: initial title
ABC Records order processingABC Records order processing
DFD Example - Step 2DFD Example - Step 2
SECOND SENTENCESECOND SENTENCE::When an order processing clerk receives an When an order processing clerk receives an
order form, he or she verifies that the sender is order form, he or she verifies that the sender is a club member by checking the Member file.a club member by checking the Member file.
RESULTRESULT: ABC Records Order Processing: ABC Records Order Processing
EE-1
R e c o rd C lu bM e m b e r
1
Verify m em bers tatus
O R Clerk
EE-2
C u s to m e r(n o n -m e m b e r)
D -1 M e m b e r M a s t e ro rd e r me m b e rd a t a
DFD Example - Step 3DFD Example - Step 3
THIRD SENTENCETHIRD SENTENCE::If the sender is not a member, the clerk returns the If the sender is not a member, the clerk returns the
order along with a membership application form.order along with a membership application form.
RESULTRESULT: ABC Records Order Processing: ABC Records Order Processing
EE-1
R e c o rd C lu bM e m b e r
1
Verify m em bers tatus
O R Clerk
EE-2
C u s t o m e r(n o n -m e m b e r)
D -1 M e m b e r M a s t e ro rd e r me m b e rd a t a
n o n -m e m b e r o rd e ra n d a p p lic a t io n fo rm
DFD Example - Step 4DFD Example - Step 4FOURTH SENTENCEFOURTH SENTENCE::If the customer is a member, the clerk verifies If the customer is a member, the clerk verifies
the order item data by checking the Item file. the order item data by checking the Item file.
RESULTRESULT: ABC Records Order Processing: ABC Records Order Processing
EE-1
R e c o rd C lu bM e m b e r
1
Verify m em bers tatus
O R Clerk
EE-2
C u s t o m e r(n o n -m e m b e r)
D -1 M e m b e r M a s t e rme m b e rd a t a
n o n -m e m b e r o rd e ra n d a p p lic a t io n fo rm
2
Verify orderitem data
O R Clerk
m e m b e ro rd e r
D -2 It e m M a s t e rit e md a t a
DFD Example - Step 5DFD Example - Step 5
FIFTH SENTENCEFIFTH SENTENCE::Then the clerk enters the order data and saves it to Then the clerk enters the order data and saves it to
the Daily Orders file.the Daily Orders file.RESULTRESULT: ABC Records Order Processing: ABC Records Order Processing
EE-1
R e c o rd C lu bM e m b e r
1
Ver ify m em bers tatus
O R Clerk
EE-2
C u s t o m e r(n o n -m e m b e r)
D -1 M e m b e r M a s t e r
n o n -m e m b e r o rd e ra n d a p p lic a t io n fo rm
2
Ver ify orderitem data
O R Clerk
m e m b e ro rd e r
D -2 It e m M a s t e r
3
Enter orderinto D aily
O rdersO R Clerk
v e rifie dm e m b e r
o rd e r
D -3 D a ily O rd e rs D e t a il
DFD Example - Step 6DFD Example - Step 6
SIXTH SIXTH SENTENCESENTENCE::
The clerk also The clerk also prints an prints an invoice and invoice and shipping list shipping list for each for each order, which order, which are are forwarded to forwarded to Order Order Fulfillment.Fulfillment.
RESULTRESULT: ABC : ABC Records Records Order Order ProcessingProcessing
EE-1
R e c o rd C lu bM e mb e r
1
Verify m em bers tatus
O R Clerk
EE-2
C u s t o m e r(n o n -m e m b e r)
D -1 M e m b e r M a s t e rme m b e rd a t a
n o n -me mb e r o rd e ra n d a p p lic a t io n fo rm
2
Ver ify o rderitem data
O R Clerk
m e mb e ro rd e r
D -2 It e m M a s te rit e md a ta
3
Enter o rderinto D aily
O rdersO R Clerk
v e rifie dme mb e r
o rd e r
D -3 D a ily O rd e rs D e t a ilo rd e r
4
P rint invo ic eand
sh ipping lis tO R Clerk
o rd e rd a t a
EE-3
O rd e rF u lfillme n t
in v o ic e a n ds h ip p in g lis t
Rules for correctness of DFDRules for correctness of DFD Following questions are useful in evaluating DFD:-Following questions are useful in evaluating DFD:- Are there any unnamed components( data flows, Are there any unnamed components( data flows,
processes, stores, inputs, or outputs) in DFD?processes, stores, inputs, or outputs) in DFD? Are there any data stores that are input but never Are there any data stores that are input but never
referenced?referenced? Are there any processes that do not receive input?Are there any processes that do not receive input? Are there any processes that do not produce output?Are there any processes that do not produce output? Are there any processes that serve multiple Are there any processes that serve multiple
purposes? (if so, simply divide it)purposes? (if so, simply divide it)
(2) Creating a Control Flow (2) Creating a Control Flow ModelModel
Represents “Represents “eventsevents” and the processes that ” and the processes that manage eventsmanage events
An “event” is a Boolean condition that can An “event” is a Boolean condition that can be ascertained by:be ascertained by:
listing all sensors that are "read" by the listing all sensors that are "read" by the software.software.
listing all interrupt conditions.listing all interrupt conditions. listing all "switches" that are actuated listing all "switches" that are actuated
by an operator.by an operator. listing all data conditions.listing all data conditions.
(3) (3) The Control Specification The Control Specification (CSPEC)(CSPEC)
The CSPEC can be:The CSPEC can be:state diagram state diagram (sequential spec)(sequential spec)
state transition tablestate transition table
activation tablesactivation tables
combinatorial speccombinatorial spec
(4)(4) The Process Specification The Process Specification (PSPEC)(PSPEC)
PSPECPSPECnarrativenarrativepseudocode (PDL)pseudocode (PDL)equationsequationstablestablesdiagrams and/or chartsdiagrams and/or charts
bubblebubble
Design Process and Design Design Process and Design QualityQuality
the design must implement all of the explicit the design must implement all of the explicit requirementsrequirements contained in the analysis model, contained in the analysis model, and it must accommodate all of the implicit and it must accommodate all of the implicit requirements desired by the customer.requirements desired by the customer.
the design must be a readable, the design must be a readable, understandable guideunderstandable guide for those who generate for those who generate code and for those who test and subsequently code and for those who test and subsequently support the software.support the software.
the design should provide a complete picture the design should provide a complete picture of the softwareof the software, addressing the data, , addressing the data, functional, and behavioral domains from an functional, and behavioral domains from an implementation perspective.implementation perspective.
Quality GuidelinesQuality Guidelines A design should exhibit an architectureA design should exhibit an architecture that (1) that (1)
has been created using recognizable architectural has been created using recognizable architectural styles or patterns, (2) can be implemented in an styles or patterns, (2) can be implemented in an evolutionary fashionevolutionary fashion For smaller systems, design can sometimes be For smaller systems, design can sometimes be
developed linearly.developed linearly. A design should be modularA design should be modular; that is, the software ; that is, the software
should be logically partitioned into elements or should be logically partitioned into elements or subsystemssubsystems
A design should contain distinct representationsA design should contain distinct representations of data, architecture, interfaces, and components.of data, architecture, interfaces, and components.
A design should lead to data structures that are A design should lead to data structures that are appropriateappropriate for the classes to be implemented and for the classes to be implemented and are drawn from recognizable data patterns.are drawn from recognizable data patterns.
Guidelines Continues….Guidelines Continues…. A design should lead to components that exhibit A design should lead to components that exhibit
independent functional characteristicsindependent functional characteristics.. A design should lead to interfaces that reduce A design should lead to interfaces that reduce
the complexitythe complexity of connections between of connections between components and with the external environment.components and with the external environment.
A design should be derived using a repeatable A design should be derived using a repeatable methodmethod that is driven by information obtained that is driven by information obtained during software requirements analysis.during software requirements analysis.
A design should be represented using a notation A design should be represented using a notation that effectively communicates its meaningthat effectively communicates its meaning..
Quality AttributesQuality AttributesA set of software quality attributes represents a A set of software quality attributes represents a
target fortarget forall software designs. all software designs. FunctionalityFunctionality:- feature set, capabilities, security:- feature set, capabilities, security UsabilityUsability:- overall consistency, documentation:- overall consistency, documentation ReliabilityReliability:- frequency and severity of failure, :- frequency and severity of failure,
accuracyaccuracyof output results, ability to recover failureof output results, ability to recover failure PerformancePerformance:- processing speed, response time, :- processing speed, response time,
resource consumption, throughput and efficiencyresource consumption, throughput and efficiency SupportabilitySupportability:- extensibility, adaptability, ease in :- extensibility, adaptability, ease in installationinstallation
Design ConceptsDesign Concepts (Assignment- (Assignment-1)1)
Submission date:- Aug 12Submission date:- Aug 12 abstractionabstraction—data, procedure, control—data, procedure, control architecturearchitecture—the overall structure of the software—the overall structure of the software patternspatterns—”conveys the essence” of a proven design —”conveys the essence” of a proven design
solutionsolution modularitymodularity—compartmentalization of data and function—compartmentalization of data and function Information hidingInformation hiding—controlled interfaces—controlled interfaces Functional independenceFunctional independence—single-minded function and —single-minded function and
low couplinglow coupling refinementrefinement—elaboration of detail for all abstractions—elaboration of detail for all abstractions Refactoring—a reorganization technique that simplifies Refactoring—a reorganization technique that simplifies
the designthe design Design ClassesDesign Classes
top related