Slippery Rock University Dr. Deborah Whitfield Go Browns!



Chapter 8: Algorithms and Problem Solving

Terms:

top-down design
Start with the overall task. Break that task into smaller, more manageable pieces. Each piece should be a logical group of statements, that is, they should belong together. Continue this process with each of the smaller pieces until they way to accomplish each is clear. Make each piece a function.
bottom-up
Consider how each individual part of the project might be accomplished. For example, if we will eventually need to scale an image, how could we do so? Write a function to test this out. Later we will use that function.
iterative design
The process we followed all semester (and in the text) was most like this. The key difference is to start with a small manageable set of goals. Write that program solution (and debug it). Then consider other goals and iteratively make it better. Each iteration is a complete, debugged solution. (This is a bit of a lie. There are always bugs that you will discover, so each iteration first deals with fixing them. Bugs are errors!)
reuse
If you have written a function to scale your image(s) when the page is resized and then decide it make sense to do this when the page first loads... why not simply call the function you have already written. You certainly don't want to rewrite it. That would be two places for bugs to appear and two places to change code if you decide to modify it.
recycle
This refers to using an existing solution, perhaps modified to fit the current task. In school we are talking about reusing your own code from other projects. Please note, that while a company will reuse code written by others, simply copying from some web site is a violation of federal law (and copying from another student is a form of plagiarism typically just call copying).

PowerPoint Slides

The complete author's slides can be found in the content area of D2L. These slides will be discussed in class.