chap 2 - functional modeling

Upload: phannarith

Post on 30-May-2018

231 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 Chap 2 - Functional Modeling

    1/23

    Functional Modeling

    Main Menu 1 of 23

    Functional Modelling

  • 8/9/2019 Chap 2 - Functional Modeling

    2/23

    Functional Modeling

    Main Menu 2 of 23

    Objectives

    To understand the modular design of system and to know about structureCharts .

  • 8/9/2019 Chap 2 - Functional Modeling

    3/23

    Functional Modeling

    Main Menu 3 of 23

    Scope

    Process SpecificationControl Flow Model

    Control SpecificationsStructure ChartsCohesion

    Coupling CodingData Dictionary

  • 8/9/2019 Chap 2 - Functional Modeling

    4/23

    Functional Modeling

    Main Menu 4 of 23

    Process Specification

    It is used to describe the details of theprocesses in the DFD of the system.

    It contains the following input to the process the algorithm used performance characteristics relevant to process design constraints to implement the process

  • 8/9/2019 Chap 2 - Functional Modeling

    5/23

    Functional Modeling

    Main Menu 5 of 23

    Control Flow Model

    Control flow modeling is required forapplications that are driven by events andproduce control information.For this, Control flow diagrams are madeThe CFD contain the same processes as the

    DFD, but shows control rather than data flow

  • 8/9/2019 Chap 2 - Functional Modeling

    6/23

    Functional Modeling

    Main Menu 6 of 23

    Control Specification

    It is used to indicate how the software behaves when an event or

    control signal is sensed which processes are invoked as a consequence of

    the occurrence of the event

  • 8/9/2019 Chap 2 - Functional Modeling

    7/23

    Functional Modeling

    Main Menu 7 of 23

    Control Specification

    The control specification represents thebehaviors of the system in two ways:

    It contains a State Transition diagram that issequential specification of behavior

    It also contains a process activation table (PAT) -a combinatorial specification of behavior.

  • 8/9/2019 Chap 2 - Functional Modeling

    8/23

    Functional Modeling

    Main Menu 8 of 23

    Control Specification

    Relationship between data and control models

  • 8/9/2019 Chap 2 - Functional Modeling

    9/23

    Functional Modeling

    Main Menu 9 of 23

    Structure ChartsModular programming - the complete systemis coded as small independent interactingmodules.Each module is aimed at doing one specifictask.The design for these modules is prepared in

    the form of structure charts.Structure charts are developed prior to thewriting of program code

  • 8/9/2019 Chap 2 - Functional Modeling

    10/23

    Functional Modeling

    Main Menu 10 of 23

    Structure Charts

    A structure chart is a design tool that pictorially shows the relation between processing

    modules in computer software describes the hierarchy of components modules

    and the data are transmitted between them

  • 8/9/2019 Chap 2 - Functional Modeling

    11/23

    Functional Modeling

    Main Menu 11 of 23

    Structure Charts - Notation

    Program modules are identified by rectangleswith the module name written inside therectangle.Arrows indicate calls, which are anymechanism used to invoke a particularmodule.

  • 8/9/2019 Chap 2 - Functional Modeling

    12/23

    Functional Modeling

    Main Menu 12 of 23

    Structure Charts - Example

    Mo dul e A

    Mo dul e B Mo dul e M Mo dul e N

    Mo dul e L

    ZX

    Y

    Dat aPara meters

    Control (fl ag)Infor mati on

    Dat aPara meters

    Control (fl ag)Inf ormati on

    Di rect call t osubor di nat e module

    Sel ecti on of subordi nat e modul edepends upon decisi on poi nt s or

    iterati ve processing

  • 8/9/2019 Chap 2 - Functional Modeling

    13/23

    Functional Modeling

    Main Menu 13 of 23

    Cohesion

    It is a measure of how tightly the statementsare related to each other in a module

    Cohesion is the degree to which moduleserves a single purposeThere should be always high cohesion.

  • 8/9/2019 Chap 2 - Functional Modeling

    14/23

    Functional Modeling

    Main Menu 14 of 23

    CohesionFunctional Cohesion

    A module performs just one function. This cohesion if present in modules does not

    effect the overall performance of the system. But too much of it breaks modules down into

    very small parts.

    Sequential Cohesion Module consisting of those processing elements,which has the output of one as the input of thenext

  • 8/9/2019 Chap 2 - Functional Modeling

    15/23

    Functional Modeling

    Main Menu 15 of 23

    Cohesion

    Communicational Cohesion Module consists of all processing elements, which

    act upon the same input data set and/or producethe same output data set.

    Procedural Cohesion Module formation associates processing elements

    together since these are found in the sameprocedural unit.

  • 8/9/2019 Chap 2 - Functional Modeling

    16/23

    Functional Modeling

    Main Menu 16 of 23

    Cohesion

    Temporal Cohesion module formation by putting together all those

    functions, which happen at the same time.

    Logical Cohesion module formation by putting together a class of

    functions to be performed. It should be avoided.

  • 8/9/2019 Chap 2 - Functional Modeling

    17/23

    Functional Modeling

    Main Menu 17 of 23

    Cohesion

    Coincidental cohesion This type of cohesion occurs when a module is

    formed by taking the common code appearing inmore than one module.

    That common code is taken out from modules andput into new module.

    This type of cohesion should be avoided as itdoes not reflect the structure of problem.

  • 8/9/2019 Chap 2 - Functional Modeling

    18/23

    Functional Modeling

    Main Menu 18 of 23

    Coupling

    Measure of interconnection among modulesin a program structure

    Data coupling argument list data is passed to the module only data flows across modules

  • 8/9/2019 Chap 2 - Functional Modeling

    19/23

    Functional Modeling

    Main Menu 19 of 23

    Coupling

    Control coupling Coupling where there is control flag - decision

    control is in subordinate module

    Common coupling Common coupling occurs when there are

    common data areas - there are modules using datathat are global

    It should be avoided

  • 8/9/2019 Chap 2 - Functional Modeling

    20/23

    Functional Modeling

    Main Menu 20 of 23

    CodingProgrammer codes each and every module of the system, giving a physical shape to thesystem.The programs should be written such thatthey are simple, easy to read, understand andmodify

    Comment lines should be given to increasethe readability and modifiability of theprogram

  • 8/9/2019 Chap 2 - Functional Modeling

    21/23

    Functional Modeling

    Main Menu 21 of 23

    Data Dictionary

    An organized listing of all data elements thatare pertinent to the system

    Data dictionary contains the followinginformation: Name - the primary name of data or control item,

    the data store, or an external entity. Alias - other names used for first entry

  • 8/9/2019 Chap 2 - Functional Modeling

    22/23

    Functional Modeling

    Main Menu 22 of 23

    Data DictionaryIt also tell about how that particular item isbeing used in the system.

    For example, it will specify if it is process,

    input,output, a data store, or an external entity.

    l d l

  • 8/9/2019 Chap 2 - Functional Modeling

    23/23

    Functional Modeling

    Main Menu 23 of 23

    Summary

    Structure charts are designing tools to show the relationship between the modules of the

    system the hierarchy of modules data transmitted between these modules.