software analysis & design tsoftware analysis & design

9
4/3/2020 Software Analysis & Design Tools - Tutorialspoint https://www.tutorialspoint.com/software_engineering/software_analysis_design_tools.htm 1/9 Software Analysis & Design Tools Software Analysis & Design Tools Software analysis and design includes all activities, which help the transformation of requirement Software analysis and design includes all activities, which help the transformation of requirement specification into implementation. specification into implementation. Requirement specifications specify all functional and non-functional Requirement specifications specify all functional and non-functional expectations from the software. These requirement specifications come in the shape of human expectations from the software. These requirement specifications come in the shape of human readable and understandable readable and understandable documents, to which a computer has nothing to do. documents, to which a computer has nothing to do. Software analysis and design is the intermediate stage, which helps human-readable requirements to Software analysis and design is the intermediate stage, which helps human-readable requirements to be transformed into actual code. be transformed into actual code. Let us see few analysis and design tools used by software designers: Let us see few analysis and design tools used by software designers: Data Flow Diagram Data Flow Diagram Data flow diagram is graphical representation of flow of data in an information system. It is capable of Data flow diagram is graphical representation of flow of data in an information system. It is capable of depicting incoming data flow, outgoing data flow and stored data. The DFD does not mention anything depicting incoming data flow, outgoing data flow and stored data. The DFD does not mention anything about how data flows through the system. about how data flows through the system. There is a prominent difference between DFD and Flowchart. The flowchart depicts flow of control in There is a prominent difference between DFD and Flowchart. The flowchart depicts flow of control in program modules. DFDs depict flow of data in the system at various levels. DFD does not contain any program modules. DFDs depict flow of data in the system at various levels. DFD does not contain any control or branch elements. control or branch elements. Types of DFD Types of DFD Data Flow Diagrams are either Logical or Physical. Data Flow Diagrams are either Logical or Physical. Logical DFD Logical DFD - This type of DFD concentrates on the system process, and flow of data in the - This type of DFD concentrates on the system process, and flow of data in the system.For example in a Banking software system, how data is moved between different entities. system.For example in a Banking software system, how data is moved between different entities. Physical DFD Physical DFD - This type of DFD shows how the data flow is actually implemented in the system. - This type of DFD shows how the data flow is actually implemented in the system. It It is more specific and close to the implementation. is more specific and close to the implementation. DFD Components DFD Components DFD can represent Source, destination, storage and flow of data using the following set of DFD can represent Source, destination, storage and flow of data using the following set of components - components - Entities Entities - Entities are source and destination of information data. - Entities are source and destination of information data. Entities are represented by a Entities are represented by a rectangles with their respective names. rectangles with their respective names. Process Process - Activities and action taken on the data are represented by Circle or Round-edged - Activities and action taken on the data are represented by Circle or Round-edged rectangles. rectangles. Data Storage Data Storage - There are two variants of data storage - There are two variants of data storage - - it can either be represented as a rectangle it can either be represented as a rectangle with absence of both smaller sides or as an open-sided rectangle with only one side missing. with absence of both smaller sides or as an open-sided rectangle with only one side missing. Data Flow Data Flow - Movement of data is shown by pointed arrows. - Movement of data is shown by pointed arrows. Data movement is shown from the base Data movement is shown from the base of arrow as its source towards head of the arrow as destination. of arrow as its source towards head of the arrow as destination.

Upload: others

Post on 27-Dec-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Software Analysis & Design TSoftware Analysis & Design

4/3/2020 Software Analysis & Design Tools - Tutorialspoint

https://www.tutorialspoint.com/software_engineering/software_analysis_design_tools.htm 1/9

Software Analysis & Design ToolsSoftware Analysis & Design Tools

Software analysis and design includes all activities, which help the transformation of requirementSoftware analysis and design includes all activities, which help the transformation of requirementspecification into implementation. specification into implementation. Requirement specifications specify all functional and non-functionalRequirement specifications specify all functional and non-functionalexpectations from the software. These requirement specifications come in the shape of humanexpectations from the software. These requirement specifications come in the shape of humanreadable and understandable readable and understandable documents, to which a computer has nothing to do.documents, to which a computer has nothing to do.

Software analysis and design is the intermediate stage, which helps human-readable requirements toSoftware analysis and design is the intermediate stage, which helps human-readable requirements tobe transformed into actual code.be transformed into actual code.

Let us see few analysis and design tools used by software designers:Let us see few analysis and design tools used by software designers:

Data Flow DiagramData Flow Diagram

Data flow diagram is graphical representation of flow of data in an information system. It is capable ofData flow diagram is graphical representation of flow of data in an information system. It is capable ofdepicting incoming data flow, outgoing data flow and stored data. The DFD does not mention anythingdepicting incoming data flow, outgoing data flow and stored data. The DFD does not mention anythingabout how data flows through the system.about how data flows through the system.

There is a prominent difference between DFD and Flowchart. The flowchart depicts flow of control inThere is a prominent difference between DFD and Flowchart. The flowchart depicts flow of control inprogram modules. DFDs depict flow of data in the system at various levels. DFD does not contain anyprogram modules. DFDs depict flow of data in the system at various levels. DFD does not contain anycontrol or branch elements.control or branch elements.

Types of DFDTypes of DFD

Data Flow Diagrams are either Logical or Physical.Data Flow Diagrams are either Logical or Physical.

Logical DFDLogical DFD - This type of DFD concentrates on the system process, and flow of data in the - This type of DFD concentrates on the system process, and flow of data in thesystem.For example in a Banking software system, how data is moved between different entities.system.For example in a Banking software system, how data is moved between different entities.

Physical DFDPhysical DFD - This type of DFD shows how the data flow is actually implemented in the system. - This type of DFD shows how the data flow is actually implemented in the system. ItItis more specific and close to the implementation.is more specific and close to the implementation.

DFD ComponentsDFD Components

DFD can represent Source, destination, storage and flow of data using the following set ofDFD can represent Source, destination, storage and flow of data using the following set ofcomponents -components -

EntitiesEntities - Entities are source and destination of information data. - Entities are source and destination of information data. Entities are represented by aEntities are represented by arectangles with their respective names.rectangles with their respective names.

ProcessProcess - Activities and action taken on the data are represented by Circle or Round-edged - Activities and action taken on the data are represented by Circle or Round-edgedrectangles.rectangles.

Data StorageData Storage - There are two variants of data storage - There are two variants of data storage - - it can either be represented as a rectangleit can either be represented as a rectanglewith absence of both smaller sides or as an open-sided rectangle with only one side missing.with absence of both smaller sides or as an open-sided rectangle with only one side missing.

Data FlowData Flow - Movement of data is shown by pointed arrows. - Movement of data is shown by pointed arrows. Data movement is shown from the baseData movement is shown from the baseof arrow as its source towards head of the arrow as destination.of arrow as its source towards head of the arrow as destination.

Page 2: Software Analysis & Design TSoftware Analysis & Design

4/3/2020 Software Analysis & Design Tools - Tutorialspoint

https://www.tutorialspoint.com/software_engineering/software_analysis_design_tools.htm 2/9

Levels of DFDLevels of DFD

Level 0Level 0 - Highest abstraction level DFD is known as Level 0 DFD, which depicts the entire - Highest abstraction level DFD is known as Level 0 DFD, which depicts the entireinformation system as one diagram concealing all the underlying details. information system as one diagram concealing all the underlying details. Level 0 DFDs are alsoLevel 0 DFDs are alsoknown as context level DFDs.known as context level DFDs.

Level 1Level 1 - The Level 0 DFD is broken down into more specific, Level 1 DFD. Level 1 DFD depicts - The Level 0 DFD is broken down into more specific, Level 1 DFD. Level 1 DFD depictsbasic modules in the system and flow of data among various modules. basic modules in the system and flow of data among various modules. Level 1 DFD also mentionsLevel 1 DFD also mentionsbasic processes and sources of information.basic processes and sources of information.

Level 2Level 2 - At this level, DFD shows how data flows inside the modules mentioned in Level 1. - At this level, DFD shows how data flows inside the modules mentioned in Level 1.

Higher level DFDs can be transformed into more specific lower level DFDs with deeper levelHigher level DFDs can be transformed into more specific lower level DFDs with deeper levelof understanding unless the desired level of specification is achieved.of understanding unless the desired level of specification is achieved.

Structure ChartsStructure Charts

Page 3: Software Analysis & Design TSoftware Analysis & Design

4/3/2020 Software Analysis & Design Tools - Tutorialspoint

https://www.tutorialspoint.com/software_engineering/software_analysis_design_tools.htm 3/9

Structure chart is a chart derived from Data Flow Diagram. Structure chart is a chart derived from Data Flow Diagram. It represents the system in more detail thanIt represents the system in more detail thanDFD. DFD. It It breaks down the entire system into lowest functional modules, describes functions and breaks down the entire system into lowest functional modules, describes functions and sub-sub-functions of each module of the system to a greater detail than DFD.functions of each module of the system to a greater detail than DFD.

Structure chart represents hierarchical structure of modules. At each layer a specific task is performed.Structure chart represents hierarchical structure of modules. At each layer a specific task is performed.

Here are the symbols used in Here are the symbols used in construction of structure charts -construction of structure charts -

ModuleModule - It represents process or subroutine or task. - It represents process or subroutine or task. A control module branches to more than oneA control module branches to more than onesub-module. Library Modules are re-usable and invokable from any module.sub-module. Library Modules are re-usable and invokable from any module.

ConditionCondition - It is represented by small diamond at the base of module. - It is represented by small diamond at the base of module. It depicts that control moduleIt depicts that control modulecan select any of sub-routine can select any of sub-routine based on some condition.based on some condition.

JumpJump - An arrow is shown pointing inside the module to depict that the control will jump in the middle - An arrow is shown pointing inside the module to depict that the control will jump in the middleof the sub-module.of the sub-module.

LoopLoop - A curved arrow represents loop in the module. All sub-modules covered by - A curved arrow represents loop in the module. All sub-modules covered by loop loop repeatrepeatexecution of module.execution of module.

Page 4: Software Analysis & Design TSoftware Analysis & Design

4/3/2020 Software Analysis & Design Tools - Tutorialspoint

https://www.tutorialspoint.com/software_engineering/software_analysis_design_tools.htm 4/9

Data flowData flow - A directed arrow with empty circle at the end represents data flow. - A directed arrow with empty circle at the end represents data flow.

Control Control flowflow - A directed arrow with filled circle at the end represents control flow. - A directed arrow with filled circle at the end represents control flow.

HIPO DiagramHIPO Diagram

HIPO (Hierarchical Input Process Output) diagram is a combination of two organized method toHIPO (Hierarchical Input Process Output) diagram is a combination of two organized method toanalyze the system and provide the means of documentation. HIPO model was developed by IBM inanalyze the system and provide the means of documentation. HIPO model was developed by IBM inyear 1970.year 1970.

HIPO HIPO diagram represents the hierarchy of modules in the software system. Analyst uses HIPOdiagram represents the hierarchy of modules in the software system. Analyst uses HIPOdiagram in order to obtain high-level view of system functions. It decomposes functions into sub-diagram in order to obtain high-level view of system functions. It decomposes functions into sub-functions in a hierarchical manner. It depicts the functions performed by system.functions in a hierarchical manner. It depicts the functions performed by system.

HIPO diagrams are good for documentation purpose. Their graphical representation makes it easierHIPO diagrams are good for documentation purpose. Their graphical representation makes it easierfor designers and managers to for designers and managers to get the pictorial idea of the system structure.get the pictorial idea of the system structure.

Page 5: Software Analysis & Design TSoftware Analysis & Design

4/3/2020 Software Analysis & Design Tools - Tutorialspoint

https://www.tutorialspoint.com/software_engineering/software_analysis_design_tools.htm 5/9

In contrast to IPO (Input Process Output) diagram, which depicts In contrast to IPO (Input Process Output) diagram, which depicts the flow of control and data in athe flow of control and data in amodule, HIPO does not provide any information about data flow or control flow.module, HIPO does not provide any information about data flow or control flow.

ExampleExample

Both parts of HIPO diagram, Hierarchical presentation and IPO Chart are used for structure design ofBoth parts of HIPO diagram, Hierarchical presentation and IPO Chart are used for structure design ofsoftware program as well as documentation of the same.software program as well as documentation of the same.

Structured EnglishStructured English

Most programmers are unaware of the large picture of software so they only rely on what theirMost programmers are unaware of the large picture of software so they only rely on what theirmanagers tell them to do. It is the responsibility of higher managers tell them to do. It is the responsibility of higher software management to provide accuratesoftware management to provide accurateinformation to the programmers to develop accurate yet fast code.information to the programmers to develop accurate yet fast code.

Other forms of methods, which use graphs or diagrams, may are sometimes interpreted differently byOther forms of methods, which use graphs or diagrams, may are sometimes interpreted differently bydifferent people.different people.

Hence, analysts and designers of the software come up with tools such as Structured English. It isHence, analysts and designers of the software come up with tools such as Structured English. It isnothing but the description of what is required to code and how to code it. Structured English helps thenothing but the description of what is required to code and how to code it. Structured English helps theprogrammer to write error-free code.programmer to write error-free code.

Other form of methods, which use graphs or diagrams, may are sometimes interpreted differently byOther form of methods, which use graphs or diagrams, may are sometimes interpreted differently bydifferent people. Here, both Structured English and Pseudo-Code tries to mitigate that understandingdifferent people. Here, both Structured English and Pseudo-Code tries to mitigate that understandinggap.gap.

Structured English is the It uses plain English words in structured programming paradigm. Structured English is the It uses plain English words in structured programming paradigm. It is not theIt is not theultimate code but a kind of description what is required to code and how to code it. The following areultimate code but a kind of description what is required to code and how to code it. The following are

Page 6: Software Analysis & Design TSoftware Analysis & Design

4/3/2020 Software Analysis & Design Tools - Tutorialspoint

https://www.tutorialspoint.com/software_engineering/software_analysis_design_tools.htm 6/9

some tokens of structured programming.some tokens of structured programming.

IFIF--THENTHEN--ELSEELSE,, DODO--WHILEWHILE--UNTILUNTIL

Analyst uses the same variable and data name, which are stored in Data Dictionary, making it muchAnalyst uses the same variable and data name, which are stored in Data Dictionary, making it muchsimpler to write and understand the code.simpler to write and understand the code.

ExampleExample

We take the same example of Customer Authentication in the online shopping environment. ThisWe take the same example of Customer Authentication in the online shopping environment. Thisprocedure to authenticate customer can be written in Structured English as:procedure to authenticate customer can be written in Structured English as:

EnterEnter Customer_NameCustomer_Name SEEK SEEK Customer_NameCustomer_Name inin Customer_Name_DBCustomer_Name_DB file file IF IF Customer_NameCustomer_Name found THEN found THEN CallCall procedure USER_PASSWORD_AUTHENTICATE procedure USER_PASSWORD_AUTHENTICATE()() ELSEELSE PRINT error message PRINT error message CallCall procedure NEW_CUSTOMER_REQUEST procedure NEW_CUSTOMER_REQUEST()() ENDIFENDIF

The code written in Structured English is more The code written in Structured English is more like day-to-day spoken English. It can not belike day-to-day spoken English. It can not beimplemented directly as a code of software. Structured English is independent of programmingimplemented directly as a code of software. Structured English is independent of programminglanguage.language.

Pseudo-CodePseudo-Code

Pseudo code is written more close to programming language. Pseudo code is written more close to programming language. It may be considered as augmentedIt may be considered as augmentedprogramming language, full of comments and descriptions.programming language, full of comments and descriptions.

Pseudo code avoids variable declaration but they are written using some actual programmingPseudo code avoids variable declaration but they are written using some actual programminglanguage’s constructs, like C, Fortran, Pascal etc.language’s constructs, like C, Fortran, Pascal etc.

Pseudo code contains more programming details than Structured English. Pseudo code contains more programming details than Structured English. It provides a method toIt provides a method toperform the task, as if a computer is executing the code.perform the task, as if a computer is executing the code.

ExampleExample

Program to print Fibonacci up to n numbers.Program to print Fibonacci up to n numbers.

voidvoid functionfunction FibonacciFibonacciGetGet valuevalue ofof n n;;SetSet valuevalue ofof a to a to 11;;SetSet valuevalue ofof b to b to 11;;InitializeInitialize I to I to 00forfor ((ii==00;; i i<< n n;; i i++)++){{ ifif a greater than b a greater than b {{ IncreaseIncrease b b byby a a;; PrintPrint b b;; }} elseelse ifif b greater than a b greater than a

Page 7: Software Analysis & Design TSoftware Analysis & Design

4/3/2020 Software Analysis & Design Tools - Tutorialspoint

https://www.tutorialspoint.com/software_engineering/software_analysis_design_tools.htm 7/9

{{ increase a increase a byby b b;; printprint a a;; }}}}

Decision TablesDecision Tables

A Decision table represents conditions and the respective actions to be taken to address them, in aA Decision table represents conditions and the respective actions to be taken to address them, in astructured tabular format.structured tabular format.

It is a powerful tool to debug and prevent errors. It helps group similar information into a single tableIt is a powerful tool to debug and prevent errors. It helps group similar information into a single tableand then by combining tables it delivers easy and convenient decision-making.and then by combining tables it delivers easy and convenient decision-making.

Creating Decision TableCreating Decision Table

To create the decision table, the developer must follow basic four steps:To create the decision table, the developer must follow basic four steps:

Identify all possible conditions to be addressedIdentify all possible conditions to be addressed

Determine actions for all identified conditionsDetermine actions for all identified conditions

Create Maximum possible rulesCreate Maximum possible rules

Define action for each ruleDefine action for each rule

Decision Tables should be verified by end-users and can lately be simplified by eliminating duplicateDecision Tables should be verified by end-users and can lately be simplified by eliminating duplicaterules and actions.rules and actions.

ExampleExample

Let us take a simple example of day-to-day problem with our Internet connectivity. We begin byLet us take a simple example of day-to-day problem with our Internet connectivity. We begin byidentifying all problems that can arise while starting the internet and their respective possible solutions.identifying all problems that can arise while starting the internet and their respective possible solutions.

We list all possible problems under column conditions and the prospective actions under columnWe list all possible problems under column conditions and the prospective actions under columnActions.Actions.

Conditions/ActionsConditions/Actions RulesRules

ConditionsConditionsShows ConnectedShows Connected NN NN NN NN YY YY YY YYPing is WorkingPing is Working NN NN YY YY NN NN YY YYOpens WebsiteOpens Website YY NN YY NN YY NN YY NN

ActionsActions

Check network cableCheck network cable XXCheck internet routerCheck internet router XX XX XX XXRestart Web BrowserRestart Web Browser XXContact Service providerContact Service provider XX XX XX XX XX XXDo no actionDo no action

Table : Decision Table – In-house Internet TroubleshootingTable : Decision Table – In-house Internet Troubleshooting

Entity-Relationship ModelEntity-Relationship Model

Entity-Relationship model is a type of database model based on the notion of real world entities andEntity-Relationship model is a type of database model based on the notion of real world entities andrelationship among them. relationship among them. We can map real world scenario onto ER database model. ER ModelWe can map real world scenario onto ER database model. ER Modelcreates a set of entities with their attributes, a set of constraints and relation among them.creates a set of entities with their attributes, a set of constraints and relation among them.

Page 8: Software Analysis & Design TSoftware Analysis & Design

4/3/2020 Software Analysis & Design Tools - Tutorialspoint

https://www.tutorialspoint.com/software_engineering/software_analysis_design_tools.htm 8/9

ER Model is best used for the conceptual design of database. ER Model can be represented asER Model is best used for the conceptual design of database. ER Model can be represented asfollows :follows :

EntityEntity - An entity in ER Model is a real world - An entity in ER Model is a real world being, which has some properties calledbeing, which has some properties calledattributesattributes. . Every attribute is defined by its corresponding set of values, called Every attribute is defined by its corresponding set of values, called domaindomain..

For example, For example, Consider a school database. Here, a student is Consider a school database. Here, a student is an entity. Student has variousan entity. Student has variousattributes like name, id, age and class etc.attributes like name, id, age and class etc.

RelationshipRelationship - The logical association among entities is called - The logical association among entities is called relationshiprelationship. . RelationshipsRelationshipsare mapped with entities in various ways. Mapping cardinalities define the number ofare mapped with entities in various ways. Mapping cardinalities define the number ofassociations between two entities.associations between two entities.

Mapping cardinalities:Mapping cardinalities:

one to oneone to one

one to manyone to many

many to onemany to one

many to manymany to many

Data DictionaryData Dictionary

Data dictionary is the centralized collection of information about data. It stores meaning and origin ofData dictionary is the centralized collection of information about data. It stores meaning and origin ofdata, its relationship with other data, data format for usage etc. Data dictionary data, its relationship with other data, data format for usage etc. Data dictionary has rigorous definitionshas rigorous definitionsof all names in order to facilitate user and software designers.of all names in order to facilitate user and software designers.

Data dictionary is often referenced as meta-data (data about data) repository. Data dictionary is often referenced as meta-data (data about data) repository. It is created along It is created along withwithDFD (Data Flow Diagram) model of software program and is expected to be updated whenever DFD isDFD (Data Flow Diagram) model of software program and is expected to be updated whenever DFD ischanged or updated.changed or updated.

Requirement of Data DictionaryRequirement of Data Dictionary

The data is referenced via data dictionary while designing and implementing software. The data is referenced via data dictionary while designing and implementing software. Data dictionaryData dictionaryremoves any chances of ambiguity. removes any chances of ambiguity. It helps keeping work of programmers and designers synchronizedIt helps keeping work of programmers and designers synchronizedwhile using same object reference everywhere in the program.while using same object reference everywhere in the program.

Data dictionary provides a way of documentation for the Data dictionary provides a way of documentation for the complete database system in one place.complete database system in one place.Validation of DFD is carried out using data dictionary.Validation of DFD is carried out using data dictionary.

ContentsContents

Data dictionary should contain information about the followingData dictionary should contain information about the following

Data FlowData Flow

Data StructureData Structure

Page 9: Software Analysis & Design TSoftware Analysis & Design

4/3/2020 Software Analysis & Design Tools - Tutorialspoint

https://www.tutorialspoint.com/software_engineering/software_analysis_design_tools.htm 9/9

Data ElementsData Elements

Data StoresData Stores

Data ProcessingData Processing

Data Flow is described by means of DFDs as studied earlier and represented in algebraic form asData Flow is described by means of DFDs as studied earlier and represented in algebraic form asdescribed.described.

== Composed ofComposed of

{}{} RepetitionRepetition()() OptionalOptional++ AndAnd[ / ][ / ] OrOr

ExampleExample

Address = House No + (Street / Area) + City + StateAddress = House No + (Street / Area) + City + State

Course ID = Course Number + Course Name + Course Level + Course GradesCourse ID = Course Number + Course Name + Course Level + Course Grades

Data ElementsData Elements

Data elements consist of Name and descriptions of Data and Control Items, Internal or External dataData elements consist of Name and descriptions of Data and Control Items, Internal or External datastores etc. with the following details:stores etc. with the following details:

Primary NamePrimary Name

Secondary Name (Alias)Secondary Name (Alias)

Use-case (How Use-case (How and where to use)and where to use)

Content Description (Notation etc. )Content Description (Notation etc. )

Supplementary Information (preset values, constraints etc.)Supplementary Information (preset values, constraints etc.)

Data StoreData Store

It It stores the information from where the data enters into the system and exists out of the system. Thestores the information from where the data enters into the system and exists out of the system. TheData Store may include -Data Store may include -

FilesFilesInternal to software.Internal to software.

External to software but on the same machine.External to software but on the same machine.

External to software and system, located on different machine.External to software and system, located on different machine.

TablesTablesNaming conventionNaming convention

Indexing propertyIndexing property

Data ProcessingData Processing

There are two types of Data Processing:There are two types of Data Processing:

Logical:Logical: As user sees it As user sees it

Physical:Physical: As software sees it As software sees it