mcs-014 unit 6 modular and structured design
TRANSCRIPT
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
1/25
MCS014 System Analysis And Design
Unit6Modular And Structured Design
By
Kirit A. D.
(MBA, PMP, ITIL, MCTS, SSBB)
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
2/25
Properties Of Design
Verifiability
Traceability
Completeness Consistency
Efficiency
Simplicity
Modular
AndStructuredDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
3/25
Design Principles
Problem Partitioning
Abstraction
Top Down Design Bottom Up Design
Modular
AndStructuredDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
4/25
Structure Chart
Depicts the modular organization of an
information system
A structure chart graphically shows the
way the components of a program or a
system are related
Modular
AndStructuredDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
5/25
Hierarchy of a Structure Chart
System
Get X Make Y
Get W Make X
Modular
AndStructuredDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
6/25
Symbols
Module AModule A
(Superordinate)
Module B(Subordinate)
Symbol of ModuleData Couples
(Data Communication)
Control Flag
(Data Being Communicated)
Module A(B & C Called Repeatedly)
Module B Module CModular
AndStructuredDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
7/25
Symbols
Module A
Module B
Predefined Module
Module A
Module B is Embedded In Module A
Subordinate Modules Are Called On Condition
Modular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
8/25
Reading Structure Chart
System
Get Marks A Get Marks B Make Result R Put Result R
Read
Marks A
Validate
Marks A
Read
Marks B
Validate
Marks B
MA MB
MA
MBR
R
MA VMAMA MB MB VMB MA : Marks AMB : Marks B
VMA : Valid MA
VMB : Valid MB
Modular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
9/25
Modularity
Modularity is a single attribute of software
that allows a program to be intellectually
manageable
Increases the design clarity
Decomposing a system into smaller
components that can be coded separately
Goals of Design
Coupling
CohesionModular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
10/25
Goal of Design
Design said to be fine only when, read, code andmaintained easily.
The design of the system should be module based
Each module controls the functions of a suitablenumber of subordinate modules at the nexthierarchical level
Communication among the module should bekept minimum
Keep the size as low as possible
The coding of modules should be genericModular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
11/25
Goal of Design - Guidelines
System should be divided in to as manyrelatively independent modules as possible(factoring)
Superordinate module should control notmore than 7 (thumb rule) subordinatemodule
Dependency level should be as low as
possible
Usually minimum 50 to maximum 100 linesof code per moduleM
odular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
12/25
CouplingData Coupling
Prepare Salary
(Superordinate)
Calculate Salary
(Subordinate)
Salary
AmountStatusSalary
Details
EOF
Modular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
13/25
CouplingStamp Coupling
Prepare Pay slip
Format Pay
slip
Employee
Record
Employee
Record
Formatted
Pay SlipSalarySalary AmountSalaryDetails
Calculate Total
Salary
Data
Structure
Modular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
14/25
CouplingControl
Prepare Pay slip
Calculate Total Salary
Write Salary is Seven Days Late
Modular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
15/25
CouplingCommon
Global data areas are used by the multiple
modules
A variable can be declared at appropriate
level so that it is treated as global variable
Modular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
16/25
CouplingContent
Used only when non of the discussed are
possible
Drawback isone module can access the
data inside another module and alter it
Most of the high level languages dont
support content coupling
Modular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
17/25
Cohesion
The degree to which a module conforms itself to the performance of a single task
Module will perform single task which leads to larger degree of portability
We can directly plug in the module in an application which requires the performance
of this task
Since it performs single task, minimum or no need to know the internal function of
any other module
There are seven types of cohesion
Functional Cohesion
Sequential Cohesion
Communicational Cohesion
Procedural Cohesion
Temporal Cohesion
Logical Cohesion
Coincidental Cohesion
Modular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
18/25
Cohesion
Functional
If every instruction in the module is related to a
single task
The name of the module will usually indicatethe task that is performed by it eg. Print Grade
Cards, Generate Payslips
Sequential
Product purchase order->prepare shipping
order-> update inventory-> update accounts
Modular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
19/25
Communication Cohesion
Its like sequential cohesion except the fact that
there is not restriction on the sequencing pattern
Find Employee Details
Employee Record Employee Name
Employee Designation
Employee Service
Modular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
20/25
Functionally Cohesion
Find Employee Details
Employee Record Employee Name
Employee Designation
Find Employee Details
Employee Record Employee Name
Employee Salary
Modular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
21/25
Procedural Cohesion
Any module not functionally cohesive is difficultto maintain
Sequence of instruction is important.
Sequence cannot be changed arbitrarily
E.g. Pick the course material from MPDD
Check the enrolment number on the Hall ticket
Attend counseling sessions at study Centre
Submit assignments at study Centre Above example shows, instructions are not related
to each other in terms of sequence.Modular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
22/25
Temporal Cohesion
Instructions in a module are related toeach other only by flow of control and aretotally unrelated to their sequence.
Eg. Delete duplicate data from inventory file
Reindex inventory file
Backup of inventory file Nothing common but, kind of cleanup
activityModular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
23/25
Logical Cohesion
Instructions in the form of sets
Bare minimum relation between various instructions
Execution takes place in terms of set of instructions
rather than individual instruction Not a good type of cohesion
Difficult to maintain logically cohesive module
Eg.
Study in home
Study in library
Study in gardenModular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
24/25
Coincidental Cohesion
No relationship between the instructions
This is worse type of cohesion among the
discussed
Modular
AndStructu
redDesign
-
7/22/2019 MCS-014 Unit 6 Modular and Structured Design
25/25
Questions ?
Thank You