OCR
3.2 SOFTWARE TOOL 33 — Where do the initializations belonging to the certain sub-problems have to take place (before which loop statements)? In the followings, we will focus our attention on the first step of the presented method, namely the way we can help students develop the skill of recognizing the loop skeleton of the algorithm. Since this phase of the method implies a developed abstraction skill, we have proposed to create a software tool that makes multiple-sense involvement possible. 3.2 Software tool The application we have developed has four main modules: code_creator, code_beautifier, code_buherator, and run_code. The code_creator module (see Figure 3.2) makes it possible to create program skeletons with different loop structures in an automatic way. The attached figure shows the user interface of this module. It runs in two modes: — Giving the parameters of the loop skeleton: We introduce — in the columns labelled with levels I, II, and III - how many loops we want on the first, second, and third level and which is subordinate to which. Additionally, we need to give the number of iterations of each loop. In the sample from Figure 3.2, the code_creator module will generate a code that has two first-level loops (with 2 and 5 iterations), and the first of them has two subordinate loops on the second level (with 3 and 4 iterations). — Drumming the loop skeleton in: This mode is supervised by the Drumming Area of the dialogue box, making it possible to type in the loop skeleton of the program, as if we have drummed in its rhythm pattern. For the first-, second-, and third-level loops’ drumming in, we implicitly use the keys a, f, and j. The above-presented loop skeleton has the following drum rhythm (The ‘_’ characters mark the space keys which must be introduced between two loops that follow in succession on the same level): afff_ffff afff_ffff aaaaa Pushing the Apply button, the C/C++ program will be automatically generated, which we can see on the right side of the display. Kinaesthesia is involved especially at this stage of the learning process. By the code_beautifier module, every C/C++ source file can automatically be reorganized (“beautified”) in such a way that its loop skeleton should easily be noticed. This operation is given an important role because of eyesight involvement (see Figure 3.4). The code_buherator module — by rewriting the source file — plants sound and delay procedures in the nuclei of each loop instruction.