Title: The Systems Development Environment
1Basic Function Modules (BFMs)
- All tasks relate to a single logical function
- Tasks are at a level that can be
- programmed with only a few lines of code
- Tasks perform a single database function
- (Add, Delete, Update, Retrieve)
- There is one and only one logical entry
- and exit.
2IPO
- Show all External I/O flows
- Use Active Process Verbs
- IPO Processes are always BFMs
- I/O not required for every process
- Processes need not be in chronological sequence
3System____________________________ Program______
_____________________ Module_____________________
_______
Analyst_______________________ Date_____________
_____________ Assigned To___________________
PROCESS
OUTPUT
INPUT
4Logic Modeling Approaches
- Structured English to represent process logic
- Decision Tables
- Decision Trees
- State-Transition Diagram or Table
- Flow Charts
5Structured English
- a technique for representing the "processing"
contents of a DFD process - Example...
- Show processing logic for a bank's service charge
calculation - Process Calculate Customer Service Charge
6Example of one form of the process
- READ summary of customer monthly balances
- BEGIN IF
- IF daily-balance is lt 300 for any given day
- THEN set service-charge to 5
- ELSE set service-charge to 0
- END IF
7 More complex example that includes
account type
- READ customer account-type and summary
of monthly balances - SELECT CASE
- CASE 1 (account-type is NOW)
- BEGIN IF
- IF daily-balance lt 300 for any given day
- THEN set service-charge to 5
- ELSE set service-charge to 0
- END IF
- CASE 2 (account-type is REGULAR)
- BEGIN IF
- IF daily-balance lt 100 for any given day
- THEN set service-charge to greater of 3
or .20 times number-checks - ELSE set service-charge to 0
- END IF
- END CASE
8CONDITIONAL STATEMENTS
- BEGIN IF
- IF Quantity-in-stock is less than
Minimum-order-quantity - THEN GENERATE new order
- ELSE DO nothing
- END IF
9 CONDITIONAL STATEMENTS
- READ Quantity-in-stock
- SELECT CASE
- CASE 1 (Quant-in-stock gt
Minimum-order-quantity) - DO nothing
- CASE 2 (Quant-in-stock
Minimum-order-quantity) - DO nothing
- CASE 3 (Quant-in-stock lt
Minimum-order quantity) - GENERATE new order
- CASE 4 (Stock out)
- INITIATE emergency re-order routine
- END CASE
10REPETITION
- DO
- READ Inventory records
- BEGIN IF
- IF Quantity-in-stock is less than
Minimum-order-quantity - THEN GENERATE new order
- ELSE DO nothing
- END IF
- UNTIL End-of-file
11REPETITION
- READ Inventory records
- WHILE NOT End-of-File DO
- BEGIN IF
- IF Quantity-in-stock is less than
Minimum-order-quantity - THEN GENERATE new order
- ELSE DO nothing
- END IF
- END DO
12(No Transcript)
13Process 1.0 -- Update Inventory Added
- DO
- READ next Invoice-item-record
- FIND matching Inventory-record
- ADD Quantity-added from Invoice-item-record to
Quantity-in-stock on Inventory-record - UNTIL End-of-file
14(No Transcript)
15Process 2.0 -- Update Inventory Used
- DO
- READ next Stock-item record
- FIND matching Inventory-record
- SUBTRACT Quantity-used from Stock-item-record
from Quantity-in-stock - UNTIL End-of-file
16(No Transcript)
17Process 3.0 -- Generate Orders
- DO
- READ next Inventory-record
- BEGIN IF
- IF Quantity-in-stock is less than
Minimum-order-quantity - THEN GENERATE Order
- END IF
- UNTIL End-of-file
18(No Transcript)
19Process 4.0 -- Generate Payments
- READ Todays-date
- DO
- SORT Invoice-records by Date
- READ next Invoice-record
- BEGIN IF
- IF Date is 30 days or greater than
Todays-date - THEN GENERATE Payments
- END IF
- UNTIL End-of-file
20DECISION TABLES
- ACTION STUBS
- CONDITION STUBS
- RULES
21Condition Stubs
Action Stubs
22CONSTRUCTING DECISION TABLES
- 1. Name the conditions and the values each
condition can assume - 2. Name all possible actions that can occur
- 3. List all possible rules
- 4. Define the actions for each rule
- 5. Simplify the decision table
23INDIFFERENT CONDITION
- In a decision table, a condition whose value
does not affect which actions are taken for two
or more rules.
24(No Transcript)
25(No Transcript)
26(No Transcript)
27DECISION TREES
- A graphical representation of a decision
situation in which decision points (nodes) are
connected together by arcs (one for each
alternative decision) and terminate in ovals (the
action which is the result of all the decisions
made on the path that leads to that oval).
28Sunday
Sleep 2 more hours
2
Weekday
Yes
Time to get up
Saturday
1
No
Sleep 1 more hour
Legend 1) Sun up? 2) What day is it?
Go back to sleep
29Yes
1
Pay base salary
No
Pay hourly wage Absence report
Yes
2
No
Yes
3
Pay hourly wage
Legend 1) Salaried? 2) Hours worked lt 40? 3)
Hours worked 40
No
Pay hourly wage Pay overtime wage
30Salaried
1
Pay base salary
Hourly
lt 40
Pay hourly wage Absence report
2
40
Pay hourly wage
gt 40
Legend 1) Type of employee? 2) Hours worked
Pay hourly wage Pay overtime wage
31Which to Use?
32Decision Tables or Trees
33State Transition Diagrams and Tables
- Illustrates how processes are related to each
other in time - Illustrate the states a system component can have
and the events that cause change from one state
to another - Diagrams or Tables
34(No Transcript)
35To Draw a STD
- 1. Identify the possible states or the initial
states - 2. Draw rectangles representing each state
- 3. Connect the states with arrows to show
transitions - 4. Each state should lead to one or more states
- 5. Label the transition arrows with event names
- 6. List the appropriate actions under each state
rectangle - 7. Consider unexpected events
- 8. Decompose diagram?
- 9. Ensure accuracy and consistency with team.
36Flow Charts
- Models internal logic of module well.
- Does not promote modular design when
- applied to overall program or system.
- Models simple decisions and loops well.
- Complex or compound decisions messier.
- Does not model data requirements.
37Flow Charting Symbols
Terminator
Process
Decision
Input/Output Operation
Control Flow
Document
On-page Connector
Off-page Connector
38START
READ STUDENT RECORD
CALUCLATE GPA
WRITE STUDENT REPORT
LAST STUDENT?
NO
STOP
39Cohesion
The level of logical relatedness exhibited by the
code within one module. The extent to which the
code within the module is focused on
accomplishing one task.
40 Types of Cohesion
- Functional - All code contributes to 1 and only 1
task. - Sequential - Code related by the sequence in
which data is used. - Communicational - Related by shared input or
output data. - Procedural - Related by order of execution
independent of functionality.
41Types of Cohesion (continued)
- Temporal - Related by point of time
- that execution occurs.
- Logical - Activities within the module
- are of same general type.
- Coincidental - No meaningful
- relationship
42Coupling
- The level of interdependence between
- modules.
- The lower the coupling the greater the level
- independence.
- Can also be thought of as the type of
- communication between modules
43Types of Coupling
- Data - Modules communicate only the data required
to perform functions. - Stamp - Composite data structures passed
including extraneous information. - Control - One module passes information that
alters program flow in another module - Common - Modules refer to same global data area.
- Content - One module calls code from inside
another module