In our top-down design, you propably have something like this:
output (introductory remarks)That "next" on the last line helps us (and the computer) know that the iteration ends there, in case there is more after the iteration exits.
iterate
(some stuff)
next iteration
Now, let's look at what I called "some stuff" inside the iteration. I think it's another sequence, first a synchronization, then the play, then the scoring. Does that sound about right? Maybe you said the same thing only different words. That's OK, this is your program. Each level of this design, we are trying to see how the program is composed of elements from the Five Concepts in the table below, or else a vague placeholder (like "some stuff") for further refinement, which eventually results in individual lines from the 5 concepts. The synchronization is another iteration, the game play is some output and input, and then the scoring involves doing some calculation on variables. When everything is down to individual steps from the Five Concepts in the table, then the program is finished. Do you see how that works?
Why don't you fill this out the best you can, and then turn the page.
Five Basic Concepts Sequence Iteration Conditional Variables Input/Output
<<Previous | ToC | Next >>
[2021 April 23]