Principal structures in flow charting, Basic Computer Science


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

  •     Sequential control
  •     IF-THEN-ELSE control
  •     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
write a program to display the first ten terms of the series 2,5,10,17,...........

Basic steps/tasks involved in spreadsheets development

Problem Write the steps to use the Network setup wizard. Elaborate the optional subcomponents in the windows component wizard. 1. Click Next to skip past the Welcome screen.

The first reason to work with assembler is that it offers the opportunity of knowing more the operation of your PC, which permits the development of software in a more constant man

Question 1 What are the advantages of Computer Interactive Graphics? Question 2 Which are the different types of camera views available in Maya? Question 3 Explain

Artificial Intelligence Artificial Intelligence is difficult science to explain, as it has fuzzy borders with  computer science, mathematics,  philosophy, physics,  psychology

Analogue and digital signals: Analogue (continuous) information is made available in virtually all aircraft equipment.  Figure 1 shows the analogue signal created by a variable

QUESTION (a) You have been asked to design and implement a chat application. Which protocol would you used TCP or UDP? Justify your answer. (b) Explain why multithreading is

Software interruptions can be thoroughly activated by the assembler invoking the number of the preferred interruption with the INT instruction. The use of interruptions aids us in