Appendices Appendix D ICT specialisation Unit SP2 - Top-Down progam design
Previous TOC Next


Overall Objective of the Unit

Students should be able to design, program, and evaluate structured algorithms for problems which need a top-down approach.


After first experiences with simple algorithmic design and programming in Unit SP1: Introduction to Programming, students should learn to use a top-down approach, while using the same design tools and programming environment. When problems become more complex, the need for a top-down approach more evident. Top-down programming is the normal way in which commercial software is designed and produced.

Summary of Content of Unit

The Unit contains three main activities: top-down design of algorithms, translating the design into a program, and bringing the program to life. As with Unit SP1: Introduction to Programming, these three activities will always be successive and closely tied together. Although the following descriptions treat each activity separately, the order of presentation does not necessarily dictate the order of teaching.



Students should be able to:

  1. describe and specify the problem to solve;
  2. develop effective and efficient algorithms for the solution of a problem, using a top-down approach through step-wise refinement.


At first the teacher sets some complex problems to be solved, but in the context of ready-made procedures already built and available in the system (and corresponding to parts or sub-problems of the original problem). In a second stage, these procedures will be analysed by students and they will now also construct these procedures themselves.

Some problems should address the processing of strings, using the tools offered by the available programming language. Algorithms of this type are important because they make it evident that only formal processing is to be expected from a computer. Examples of suitable problems are: concatenation, counting the number of words in a text, writing a text in reverse, changing all the vowels in a text, searching for a word in a text.

It is important to point out problems which fall outside the scope of these formal possibilities, such as: translating a text, correcting a text or summarizing a text.



Students should be able to:

  1. understand that a computer processes «formal objects» only;
  2. transform their algorithms into computer programs in a procedural language using formal procedures or functions;
  3. produce a procedure-structured, readable, understandable and user-interactive program.


It is important that the top-down designed algorithms are transformed into programs which have procedures and functions, so that students appreciate the need for these constructs.

Before the actual program is written, students should evaluate and debug, step by step, a given, sub-divided algorithm; they should create their own set of test data and explore the different parts of the algorithm, but also the algorithm as a whole.

Students should use the following programming constructs: procedure, function, global and local variables, parameters. They should be offered procedures and functions as tools for string processing which they will use to solve text processing problems.



Students should be able to:

  1. use a standard programming environment to edit, compile, debug, update and run the constructed programs;
  2. give a meaningful and useful written description of the internal and external working of the programs.


Students should store and retrieve programs on and from disks, for further use and modification. They should learn to differentiate between syntax errors and execution errors; and identify possible causes for each type of error.

Students should test their programs with given or created test data to determine correctness and limitations and should learn how to obtain printed output and a hard copy of source code.

Teachers should ensure that clear and adequate documentation is produced of all programs so that other users are able to understand the operation of the programs and make further modifications.


Minimum necessary resources:

One computer per student; suitable programming language or tool.

Optional extra resources:

Printer; Liquid crystal display panel for overhead projector.


This unit is essential preparation for General and Vocational Specialisation Modules.