Principal structures in flow charting, Basic Computer Science

PRINCIPAL STRUCTURES IN FLOW CHARTING

Structured programing calls for the usage of four principal structures to help simplify the program. They are:

  •     Sequential control
  •     IF-THEN-ELSE control
  •     Replication PRE-TEST (DO WHILE) AND POST-TEST (DO UNTIL)
  •     Case Structure PRE-TEST AND POST-TEST

These structures are illustrated in the 5 figures.

The first of the figures, is the conventional sequential flow in a given order. That is, Module A, followed by Module B and followed by Module C. For example: Data is read, data is processed and data is printed out.

Figure 1

313_structure in flow charting.png

The second structure, is used for processing if a specific condition is true. For example: If the condition is true, then MODULE A is processed, ELSE the condition is false and MODULE B is processed.

Figure 2

46_structure in flow charting1.png

The third structure is used for repeated operations (replications). For example: Do the following sequence of instructions WHILE the condition is TRUE.

The DO AND TEST (or DO UNTIL) is similar to the DO WHILE except for an important difference. In the DO WHILE the condition for executing MODULE A is first checked and if not true, MODULE A is not executed. In the DO AND TEST, MODULE A is first processed, then the condition tested.

Figure 3

1913_structure in flow charting2.png

The following figure describes the case structure. This is applicable when there are multiple alternatives available and depending on the testing of a condition, exactly one case has to be processed.

1760_structure in flow charting3.png

Any program can be designed by combining these various structures. 

Posted Date: 9/14/2012 6:03:26 AM | Location : United States







Related Discussions:- Principal structures in flow charting, Assignment Help, Ask Question on Principal structures in flow charting, Get Answer, Expert's Help, Principal structures in flow charting Discussions

Write discussion on Principal structures in flow charting
Your posts are moderated
Related Questions
In many respect threads operate in the similar way as that of processes. A number of the similarity and differences are: Similarities • Similar to processes threads share CPU and o

Question 1 Write a long note on the security features of Windows XP Question 2 Write a long note on computer peripherals, briefly describing some of the devices Question

even though most systems only distinguish among user and kernel modes, some CPUs provide multiple modes. Multiple modes could be used to provide a finer-grained security strategy.

#questioPurpose of this assignment: 1. Using dictionaries. Assignment: Write a program to read a text file and create a dictionary. The keys for the dictionary should be all

Data Processing : Processing data is the most complex function of a computer system. It is where the computer itself (as opposed to a peripheral, e.g. a visual display unit or a p

#formular for calculating speed up factor fo super scalar architecture, super pipeline architecture and VLIW with m different functional units.

Input Devices: i)  Keyboard is the most common form of input devices. It was originally designed in the last century. Since then, only minor improvements have taken place in k

what is meant by deliverable in strus base applications

Types of Browsers: Line Mode Browsers : The initial browsers were line mode text browsers. These browsers were simple and used to display text line by line. They used to prov

Each Many to Many relationship type maps into the Table. The primary key of this relevant is the combination of the primary keys of the participating entity types. These are also c