|
|
|
| |
|
Flowcharts are the graphical representations of solutions or algorithms. They are a key step between the understanding of the steps
needed to accomplish a task and the different steps that the program will take to finish the task. The more complex the problem, the more a flowchart
or other similar tool is essential in the design process of the program. This is because the more complex a program, the harder it is to follow
the logical relationships of all of the steps within the program. Flowcharts allow the programmer to work on and record one part of the problem, before
moving to the next problem, without being mired in the complexity of the whole program. They also allow the programmer to work out the logic of
the program without being bogged down with the syntax of a specific language. The ability to understand the logical structure of a program without being
confused in the details is indispensable.
|
| |
|
Below you will find flowcharts that show examples of 4 basic types of flowcharts, with different variations shown in each flowchart.
As you try to follow each one of the flowcharts use a table to write down the values of each of the variables. This will help in understanding how
the flowchart works.
|
|
| |
Sequence, If - Else, Post-Test loop
Create a structured flowchart that will add Y + 1 to X. Check to see if X is odd, if it is then print the value of Y, if
it is even add 1 to X. Then add 1to Y. Repeat these steps until Y is greater than 4, using a Post-Test loop.
|
| |
Sequence, Input, Printing, If, Pre-Test loop
Create a structured flowchart with a Pre-Test loop that will read in an arbitrary amount of records of name and amount. Program will print the name from each record and the total of all amounts greater than 500.
|
| |
Control break program
Design a structured flowchart with Pre-Test loops for a program that will read in name and amounts of a file that has been sorted by name. Print the name of each record only once and print the total amount per person. At the end of the program print
out the total amount of records read.
|
| |
Bubble Sort
Design a flowchart that will sort integers in ascending order.
|
| |
Binary Sort
Design a flowchart that will sort integers in ascending order.
|