Program Design
Please do your designs
Seriously, you need to learn to do this.
Before you program.
Our author has a good discussion on Program Design
Please read chapter six of
the book
.
He starts by discussing standards and tools
This process is not very standardized
And we will not employ automated tools for a while.
He discusses Test data
I will give some test data in my assignments.
You should understand this first
It will not be complete.
But as you work through the problem you might encounter other ideas
Note this down, make it part of YOUR test data.
Especially edge cases.
There are some modern design strategies that involve producing test data BEFORE you design the algorithm.
IPO : input - process - output
This is really the algorithm for almost every business like application.
Algorithm
: a set of instructions that solve a problem in a finite amount of time.
MEMORIZE this!
Pseudocode
pseudocode
or false code
English like statements that describe steps in solving a problem.
THIS IS NOT REAL CODE
There is no syntax
Pseudocode for me
Big ideas summarized in a single simple statement
Get the file name and open the file.
get the next data set
compute the gallons of ice cream needed
print the results.
If a control construct is involved
Use if, while, do , for, foreach
You can be sloppy about the "syntax"
But indent the body
while not at the end of a file process the last input print the results get the next input.
DO NOT WRITE CODE.
DO NOT WRITE CODE.
Heirarchy chart
He presents this on page 126
It shows the "big picture" on how modules/functions relate
I made this one in word,
Insert tab
Illustrations Group
SmartArt
Heirarchy
you should test your pseudo code by running through the test cases.
This takes practice