Skip to Main Content
Students' Guide to Program Design
book

Students' Guide to Program Design

by Lesley Anne Robertson
May 2014
Intermediate to advanced content levelIntermediate to advanced
188 pages
7h 8m
English
Newnes
Content preview from Students' Guide to Program Design
Selection control structures
These two tasks could have been separated into modules, before the
algorithm was developed in pseudocode. Breaking a problem into
modules will be discussed in Chapter 7.
The solution algorithm can also be represented by a N-S diagram:
Compute-Employee-Pay
Set All-fields-valid to true
Set Error-message to blank
Read Emp-no, Pay-rate, Hrs-worked
Error-message
=
'Pay rate exceeds
£25.00'
All-fields-valid = false
Error-message
='Hours
worked exceeds limit of 60'
All-fields-valid = false
Print Emp-no
Pay-rate,
Hrs-worked,
Error-message
Emp-weekly-pay
=
Pay-rate
*
Hrs-worked;
Print Emp-no,
Pay-rate,
Hrs-worked,
Emp-weekly-pa ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Reinventing the Organization for GenAI and LLMs

Reinventing the Organization for GenAI and LLMs

Ethan Mollick

Publisher Resources

ISBN: 9781483141442