+ All Categories
Home > Documents > Unit 6 - Software Design and Development LESSON 11 FLOW...

Unit 6 - Software Design and Development LESSON 11 FLOW...

Date post: 08-Aug-2020
Category:
Upload: others
View: 6 times
Download: 0 times
Share this document with a friend
20
LESSON 11 FLOW - CHARTS AND PSEUDOCODE Unit 6 - Software Design and Development
Transcript
Page 1: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

LESSON 11– FLOW-CHARTS AND PSEUDOCODE

Unit 6 - Software Design and Development

Page 2: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Previously

Key features of programming languages

Software Development Lifecycle

Using tools to demonstrate software design Inputs and outputs

GUI design with storyboards

Design constraints.

Tools. Data flow diagrams.

Structure diagrams.

Entity relationship models

Page 3: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

What is covered in this session Flow diagrams

Pseudocode

Page 4: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

flowcharts

Page 5: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Flowcharts

a tool for analysing processes.

allows any process to be: broken down into individual events or activities

to display these in shorthand form

shows the logical relationships between them.

Constructing flowcharts promotes: better understanding of processes,

better understanding of processes is a pre-requisite for improvement.

http://www.hci.com.au/flowcharting-a/

Page 6: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Flowcharts – basic symbols

start

end

Decision?

process

connector

Page 7: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Flowcharts – basic symbols

Off page connector

Data storage

display

Predefined process

display

Page 8: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Flow charting – basic rules

are written top to bottom.

can exit to the right

can enter from the left.

Page connectors are used when more than one page is required.

Arrows are used to show the flow.

Page 9: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Flow charting – example task 29

Part of the requirements for assignment 3 are: The decorator needs to enter the height of the room

(assume all walls are the same height i.e. no sloping ceilings).

The height must be between 2.4m and 6m.

The length of all four walls must be entered (minimum 1m and maximum 25m).

Produce a flowchart for this requirement.

For assignment 3 this flowchart will need to be extended to include the calculations and output.

Page 10: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Pseudo code

provides a design technique which is very close to the code that will eventually be written.

It’s a kind of ‘halfway house’ between the high level generalised techniques like structured diagrams and low level details that are required in the actual code.

useful for working out how complex algorithms (mathematical formulae) will be written in program code.

Page 11: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Pseudo code - indenting

The rules are reasonably straightforward.

All statements showing "dependency" are to be indented.

These include while, do, for, if, switch. .

Page 12: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Pseudo code – keywords

For looping and selection, the keywords that are to be used include Do While...EndDo; Do Until...Enddo; Case...EndCase; If...Endif; Call ... with (parameters); Call; Return ....; When; Always use scope terminators for loops and iteration, even though Python does not use them.

Page 13: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Pseudo code – keywords

• As verbs, use the words:

• Generate,

• Compute,

• Process, etc.

• Words such as

• set, reset, increment, compute, calculate, add,

sum, multiply, ... print, display, input, output, edit,

test , etc.

• with careful indentation tend to foster desirable

pseudo code.

• Do not include data declarations in your pseudo

code.

Page 14: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Pseudo code - example

Dim Num1 As Integer Dim Num2 As Integer Num1 = Text1.Text Num2 = Text2.Text If Num1 > Num2 Then MsgBox "Num1 is Greater than Num2" If Num1 < Num2 Then MsgBox "Num2 is Greater than Num1" If Num1 = Num2 Then MsgBox "Num1 and Num2 are equal"

Make Num1 as the text in Text1 Make Num2 as the text in Text2 if Num1 is greater than Num2 then "Num1 is greater than Num2" else if Num1 is smaller than Num2 then "Num2 is Greater then Num1" else if Num1 is equal to Num2 then "Num1 and Num2 are equal"

Page 15: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Pseudo code Task 30

Using the scenario in A3

Develop an algorithm using pseudo-code to describe how the calculation should be done to estimate the cost of decorating for:

any given size of room,

choice of paint

undercoat.

Page 16: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Assignment 3: submit to TurnitinL3U06A3PeterPan2017

Design the program.

Use at least two design tools (flow chart, structure diagram, DFD diagram or ERD diagram) to identify the different procedures in the program.

Do not use pseudo-code for this task.

Show a storyboard for the design. Explain any differences from the final layout (actual program).

Page 17: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Assignment 3: submit to TurnitinL3U06A3PeterPan2016

Now develop the program. The following will need to be demonstrated: A well designed interface Choice of paint quality Window area calculation Working calculation to determine the area

to be painted Bill including:

total and invoice number

Page 18: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Assignment 3: submit to TurnitinL3U06A3PeterPan2016

As part of the company’s procedures, all design work needs to be documented. Write a justification of the data types and software structures chosen. Consider the variables defined in the design (explain WHY

particular data types were chosen, WHAT the alternatives were and WHY these were not considered suitable. In some cases this will be obvious i.e. a text input box.)

the way the system has been structured; by splitting it into a number of different procedures, for example.

Page 19: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Assignment 3: submit to TurnitinL3U06A3PeterPan2016

Develop an algorithm, using pseudo-code, to describe how the calculation should be done to estimate the cost of decorating for any given size of room, choice of paint and undercoat. (The algorithms produced should be annotated to explain how they work and how they meet the requirements of the system).

Page 20: Unit 6 - Software Design and Development LESSON 11 FLOW ...wiki.hct.ac.uk/_media/computing/btec/level3/l3u6l11_flowchartsand... · Flow charting –example task 29 Part of the requirements

Summary

Flow charts

Pseudo code

A3


Recommended