Wednesday, July 22, 2009

Programming Tools

There are a number of rules to follow in writing good programs. Years ago good programs simply ran and got results. However, in today’s world, programs the run well are not necessarily good. Despite producing correct results, as expected, a program may still have problems. For instance, a program needs modification which can be very difficult in a complicated program. For this, flowcharting is very important and helpful to the programmer.

Structured programming refers to group of techniques used to make programming easier. When programmers use these techniques, less time is required, there are fewer errors, and programs are easier to modify. Structured programs rely on the use of subroutines.

What are subroutines? There are times when the computer should perform a specific task several times within a program, or even throughout many program. Rather than rewriting the same instructions every time the task needs to be done, a programmer can write the instructions once, as a subroutine, and the computer is directed to the subroutine whenever necessary. This also has something to do with a loop (in flowcharting), namely a sequence of instructions in a program that can be executed repetitively until an exit criterion is met. One loop cycle is called a pass, and a nested loop is a loop within a loop.

In a program flowchart, there is what is called decision tree. It is a type of program flowchart. The base of the tree is usually at the left, with branches drawn from left to right. The branches represent different outcomes to various decisions. Unlike other flowcharts, the branches are never rejoined.
With regard to programming, the differences between a decision tree and a decision table should be made. The decision tree is a diagram, while the decision table is a chart. Finally the term pseudo code, or simply a pseudo code design refers to a design resembling a correctly coded program. It is a sequence of English sentence that uses only a few words. These key words correspond to the structures found in the program instructions. Many people think pseudo code is easier to write and modify than program flowchart.

A. Answer the following questions based on the text above!
1. How can a programmer write good programs?
2. How important is “structured programming”?
3. What is a Subroutine?
4. What is a decision tree?
5. What is a pseudo code design?
6. What is a decision table?
7. What is represented by the branches?
8. It in “it is a type of program flowchart” refers to …

No comments:

Post a Comment