Title: Jackson Structured Development
1Jackson Structured Development
- See Bell et al ch 7
- Data oriented
- 3 constructs
- sequence
- iteration and
- selection
2Jackson Structured Development
SEQUENCE ITERATION SELECTION
A
A
A
B
B
C
D
BO
BO
BO
Pseudocode A seq B C D A end
A itr B A end
A sel B A alt C A alt D A end
3Jackson Structured Development
- Example 1
- suppose we want a program to produce the output
as shown
Picture
Top-half
Bottom-half
Middle
Line
Line
4Jackson Structured Development
- Next, define elementary operations
1. Write n asterisks 4. Increment s 7. Decrement
n 2. Write a blank line 5. Decrement s 8.
Initialise n s 3. Write s spaces 6. Increment n
- Add operations to the diagram
8
2
1
5
1
4
3
6
3
7
5Jackson Structured Development
- Transform into pseudocode
- initialise n and s
- while more lines
- do
- write s spaces
- write n asterisks
- decrement s
- increment n
- end while
- write blank line
- initialise n and s
- while more lines
- do
- write s spaces
- write n asterisks
- decrement n
- increment s
6Jackson Structured Development
- Summary of steps
- Draw a diagram showing the structure of the data
- Derive the corresponding program structure chart
- Write down the elementary operations
- Place the operations on the program structure
diagram - Derive the schematic logic of the program
7Jackson Structured Development
- Example 2
- Design a program to input and add up any number
of numbers ending with a negative number
Steps 1. Read number 2. Add number to sum 3.
Initialise sum 4. Print sum
Process Numbers
sum0 read number while number gt 0 do add
number to sum read number end while print sum
Process Body
Process Negative Number
3
1
Process Number
2
4
8Jackson Structured Development
- Example 3
- Suppose we have a stock control system that has a
menu
STOCK CONTROL 1. Issue stock 2. Receive stock 3.
Create item 4. Delete item 5. Query item 6.
Exit Please enter choice_
Dialogue
Screen
Heading
Choices
Prompt
Response
Invalid
Valid
Wrong
1 o
2 o
Etc.
Junk
Error msg
9Jackson Structured Development
While usr choice not end do clear screen
display heading display choices display
prompt accept user choice while user
choice is wrong do display error msg
accept user choice end while case user
choice 1 call issue procedure .
. 5 call query procedure end
case end while
- Elementary operations
- clear screen
- display heading
- display choices
- display user prompt
- accept user response
- display error message
- call issue procedure
- call receive procedure
- call create procedure
- call delete procedure
- call query procedure
10User Interface Design
- User Interface Design
- creates an effective communication medium between
a human and a computer - identifies interface objects and actions and then
creates a screen layout that forms the basis for
an user interface prototype - an iterative process
- Steps
- identify user, task and environmental
requirements - create scenarios which are then analysed to
define a set of interface objects and actions - create screen layout (graphics, text, menus, etc)
- prototype the design
- evaluate for quality
11User Interface Design
- Golden Rules
- Place the user in control
- define interaction modes in a way that does not
force a user into unnecessary or undesired
actions - provide for flexible interaction
- allow user interaction to be interruptible and
undoable - streamline interaction as skill levels advance
and allow the interaction to be customised - hide technical internals from the casual user
- design for direct interaction with objects that
appear on the screen
12User Interface Design
- Golden Rules
- Reduce the users memory load
- reduce demand on short-term memory
- establish meaningful defaults
- define shortcuts that are intuitive
- the visual layout of the interface should be
based on a real world metaphor - disclose information in a progressive fashion
- Make the interface consistent
- maintain consistency across a family of
applications - do not change past interactive models unless
there is compelling reason to do so
13Component-level Design
- Component-level Design
- also called procedural design
- occurs after data, architectural, and interface
designs - represents the design at a level of abstraction
that is close to code - establishes the algorithm detail required to
- manipulate data structures, effect communication
between software components via their interfaces,
- and implement the processing algorithms allocated
to each component - Component-level design notations
- Flowchart (based on structured programming,
Dijkstra, 1960s) - Decision table
- Program Design Language (PDL)
14Component-level Design
- Flowchart (sequence, if-then-else, switch,
do-while, repeat-until)
15Component-level Design
- Decision Table
- CONDITIONS 1 2 3
4 5 - fixed rate account T T F F F
- variable rate account F F T T F
- consumptionlt100kwh T F T F
- consumptiongt100kwh F T F T
- ACTIONS
- min. monthly charge X
- schedule A billing X X
- schedule B billing X
- other treatment X
16Component-level Design
- Program Design Language (PDL)
- also called structured English, or pseudocode
- looks like programming language, but
- use narrative text embedded directly into a
syntactical structure - cannot be compiled
- could be translated into a programming language
skeleton or a graphical representation(e.g.
flowchart) of design