3.3 SUGGESTED SYLLABUS 35
|
—
|
|
| | rloop
| | |
| | a
| |else
| | rloop
| | |
| | a
| um
Figure 3.3. A loop skeleton example and its representation
How will the listener discern the loops, and how will he/she be able to dis¬
tinguish them? The solution we have chosen is the following: in parallel loops, we
implemented the same sounds but with different musical instruments. For example
(see Figure 3.3):
A possible sound sequence of the above algorithm is (fa* is a violin fa):
The nucleus of the outer loop is repeated twice, the nucleus of the first inner
loop three times (during its both executions), and the nuclei of the parallel inner
loops five and four times respectively. Each of the parallel loops is executed ones.
In the dialogue box of the run_code module (see Figure 3.4), the “beautified
C/C++ code” of the analysed algorithm appears. Pushing the Run button starts
the slow-motion running of the program. While the students “are listening to
the loop skeleton of the algorithm” represented by its sound sequence, they can
keep their eyes on the program’s running (as we can see, the instruction which
is being executed is highlighted).
We suggest the following syllabus (students are not only observers of a sim¬
ulation, they are actively involved in the teaching-learning process; bidirectional
student-computer communication):