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
Our instructor gave us a project in making a mechanical game or simple device using assembly language, can anyone give me a an example of a project description for our proposal?

There is a path between two vertices if there is a series of edges that you can use to travel between them. For example, between vertices 1 and 3 above, there is a path made up of

They are used to act upon logic operations on the operators. AND OR, NEG NOT TEST XOR AND INSTRUCTION Function: It acts upon the conjunction of the operators bit by bit. Syntax: A

Previous to we can perform writing to the disk it is essential to define the data transfer region using for this end the 1AH function of the 21H interruption. The 1AH function does

Language of Digital Computers: Digital computers are electronic devices which operate on two valued logic (On and OFF). The ability of a transistor to act as a switch is the k

Disk output : You will already have decided whether to use a hard disk or floppies for storing data. An important point of disk management is to ensure a secure method of kee

100 animals and their respiratory organs

Question 1. Explain the levels of management? Question 2. What are the advantages and disadvantages of DBMS Question 3. What are the advantages and disadvantages o


Regardless of of the fact that a thread must execute in process, the process and its associated threads are different notion. Processes are used to group resources together and thr