Analysis Modeling. Requirements Analysis Requirements analysis – specifies software’s...

14
Analysis Modeling

Transcript of Analysis Modeling. Requirements Analysis Requirements analysis – specifies software’s...

Analysis Modeling

Requirements Analysis• Requirements analysis

– specifies software’s operational characteristics– indicates software's interface with other system elements – establishes constraints that software must meet

• Requirements analysis allows the software engineer (called an analyst or modeler in this role) to:– elaborate on basic requirements established during earlier

requirement engineering tasks

– build models that depict user scenarios, functional activities, problem classes and their relationships, system and class behavior, and the flow of data as it is transformed.

A Bridge

system description

analysis model

design model

ANALYSIS MODEL: a representation of requirements in terms of text and diagrams depicting requirements for data, function and system behavior in a way easy to understand and review for correctness, completeness and consistency

Rules of Thumb• The model should focus on requirements that are visible within

the problem or business domain. The level of abstraction should be relatively high (focus on the “WHAT”, not “HOW”).

• Each element of the analysis model should add to an overall understanding of software requirements and provide insight into the information domain, function and behavior of the system.

• Delay consideration of infrastructure and other non-functional models until design.

• Minimize coupling throughout the system. • Be certain that the analysis model provides value to all

stakeholders. • Keep the model as simple as it can be.

Domain AnalysisThe identification, analysis, and specification of common requirements, typically for reuse on multiple projects within that application domain.

Sources of domain knowledgeSources of domain knowledge

Technical literature

Existing application

Customer surveys

Expert advice

Current/future requirements

Analysis Modeling Approaches

• STRUCTURED ANALYSIS considers data and processes transforming the data as separate entities. Data objects are modeled defining their attributes and relationships. Processes depict transformation of data objects as they flow through the system.

• OBJECT-ORIENTED ANALYSIS focuses on the definition of classes and the way they collaborate with one another to satisfy customer requirements. (UML and Unified Process are predominantly object-oriented)

Data Modeling

• Examines data objects independently of processing

• Focuses attention on the data domain

• Creates a model at the customer’s level of abstraction

• Indicates how data objects relate to one another

What is a Data Object?

ObjectObject——something that is described by a something that is described by a setsetof attributes (data items) and that will be of attributes (data items) and that will be

manipulated within the software (system)manipulated within the software (system)

each each instanceinstanceof an object (e.g., a book) of an object (e.g., a book) can be identified uniquely (e.g., ISBN #) can be identified uniquely (e.g., ISBN #)

each plays a necessary role in the systemeach plays a necessary role in the systemi.e., the system could not function without i.e., the system could not function without access to instances of the objectaccess to instances of the object

each is described by attributes that are each is described by attributes that are themselves data itemsthemselves data items

Typical Objects

external entities external entities (printer, user, sensor)(printer, user, sensor)thingsthings (e.g, reports, displays, signals) (e.g, reports, displays, signals)

occurrences or events occurrences or events (e.g., interrupt, alarm)(e.g., interrupt, alarm)roles roles (e.g., manager, engineer, salesperson)(e.g., manager, engineer, salesperson)

organizational unitsorganizational units (e.g., division, team)(e.g., division, team)

placesplaces (e.g., manufacturing floor) (e.g., manufacturing floor)

structures structures (e.g., employee record)(e.g., employee record)

Data Objects and 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?

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

Cardinality and Modality

• Cardinality: Is the number of occurrences of one object that can be related to the number of occurrences of another. Cardinality

can be expressed as one or many.Example: A Parent can have many children,

but a nation can have only one president.

• Modality: Is 0 if the occurrence of relationship is optional and Is 1 if occurrence of relationship is mandatory.

Example: For any order there must be a customer. but its not necessary that the order is processed.

Building an ERD

• Level 1—model all data objects (entities) and their “connections” to one another

• Level 2—model all entities and relationships• Level 3—model all entities, relationships, and the attributes that

provide further depth

The ERD: An Example

(1,1)(1,1) (1,m)(1,m)placesplacesCustomerCustomer

requestrequestfor servicefor service

generatesgenerates (1,n)(1,n)

(1,1)(1,1)

workworkorderorder

workworktaskstasks

materialsmaterials

consistsconsistsofof

listslists

(1,1)(1,1)(1,w)(1,w)

(1,1)

(1,i)(1,i)

selectedselectedfromfrom

standardstandardtask tabletask table

(1,w)(1,w)

(1,1)(1,1)