Copyright 2001 (c) Logic Code Generator Ltd; You must not take information from this web page and reuse without the owner's permission!

SAMPLE FLOWCHARTS
In the following table we list a group of different flowchart systems for your view and possible download with their source code. Select the check box to the right of the flowchart you would like to download and then right click the 'Get flowchart + code' button at the bottom of the table.

AN EXAMPLE COMPLEX SOFTWARE SYSTEM SOLUTION

Here is a Hierarchy Diagram of a Software System with modules that let the user create and mail-merge sales letters. The system also lets the user print the mailing labels. The Hierarchy diagram shows all the modules in the system and their interrelationship. The proceeding table then gives a list of individual flowchart for control logic that implement each module in the system. This design method is called Functional Decomposition or Top-down design. NOTE that both the hierarchy diagram and the set of flowchart documents the Software System Design.

 

 

The set of flowcharts that constitute the whole software system is given in the following table.

Description
FLOWCHART - Control Logic
Source Languages

The control logic for a menu driven software system that create sales letters by mail merge along with mailing labels. The user interacts with the program through keyboard inputs.

The flowchart uses the Switch-case structure along with functions/subroutine to implement the program that display the menu and allow users to execute functions within the menu system. The main control logic is an abstract view of the whole system.

You can use the LogicCoder document file for this control logic to implement similar or the same program in the same or in different source languages without making any mistake on the coding of the control logic. You cam also use LogicCoder to do modification to this control logic to implement more complex systems.

Taken from "Structured Programming with ANSI C" ISBN 0-9544270-0-9

BASIC and ANSI C++

Each module in the overall program has a control logic solution that is illustrated by a flowchart. Some modules have a relatively simple control logic and do not need additional functional decomposition. Some modules have control logic that overlap with each other and therefore present the opportunity for reusable components in the overall problem solution.

Taken from "Structured Programming with ANSI C" ISBN 0-9544270-0-9

BASIC and ANSI C++

The subroutine/function control logic in the program that Display the Menu and gets a selection from the user. The control logic solution can also be used for any other similar menu driven application.

NOTE that these control logic uses iterative as opposed to recursive looping to implement repetitive operations. Hence their implementation in a source language makes very efficient use of time and hardware resources on the computer system.

Taken from "Structured Programming with ANSI C" ISBN 0-9544270-0-9

BASIC and ANSI C++

The control logic to be used for printing a list of the customers in the user database system. You can modify this control logic with the use of LogicCoder to print any similar set of data values in any program language supported by LogicCoder

Taken from "Structured Programming with ANSI C" ISBN 0-9544270-0-9

BASIC and ANSI C++

The control logic of the function that obtain a valid City and Country address is very similar to the control logic that obtain a valid Title and Name. Therefore, you can use LogicCoder to create a template or generic control structure and then use it to generate the source code for both of these functions.

In addition, because you can load different source code and deferent description text into the same flowchart, you can use a single flowchart to document both functions.

Taken from "Structured Programming with ANSI C" ISBN 0-9544270-0-9

BASIC and ANSI C++

This control logic and its description is very similar or the same as the previous flowchart. Therefore, both functions can be implemented by a generic control logic.

Taken from "Structured Programming with ANSI C" ISBN 0-9544270-0-9

BASIC and ANSI C++

The control logic solution used by this module is relatively complex. It uses other modules which are actually implemented as subroutines or functions in the program. These other modules must be broken down into simpler flowchart in a manner similar to that we have been doing so far. Note the use of validation loops for obtaining keyboard inputs from the user. Both these input loops takes and validate numeric values from a user and therefore can be implemented from a generic numeric input-validation function.

Using flowcharts to design and document a program problem solution gives the designer greater opportunity to design efficient solutions and to optimise these solution with the use of reusable components. LogicCoder supports this approach very well by letting the user abstract section of a control logic and then have them saved as reusable templates.

Taken from "Structured Programming with ANSI C" ISBN 0-9544270-0-9

 



 

BASIC and ANSI C++

By visual observation, you could use the control logic for the module that "Obtain valid city or county address" to implement this control logic. You do this by editing the structure of the flowchart, by deleting unwanted symbols, by inserting other symbols, and by changing symbol types. In addition, you would edit the text content of the flowchart

 

With LogicCoder it is easy to edit either template control logic solution or an existing control logic solution to create a new flowchart. These opportunities are easy to spot with LogicCoder

Taken from "Structured Programming with ANSI C" ISBN 0-9544270-0-9

 

BASIC and ANSI C++

Select All
STRING HANDLING ALGORITHMS
DESCRIPTION
ALGORITHM FLOWCHART
An algorithm that gets a string of given length from a user from the standard input device and then prints out the first set of characters as specified by the user.

ANSI C++

STRING MATCHING ALGORITHM FOR STOCHASTIC PROCESSING

String processing algorithms are very useful in stochastic systems for implementing pattern matching algorithms. Pattern matching algorithms are some time far more efficient and effective than neural network used in artificial intelligence.

 

Here is part of a string processing algorithm used for processing an academic document to determine the main subjects of the article. The algorithm also determine the main subject of article and then print a summary report in an output HTML text document.

Only some section of the algorithm is shown. It was created by a student as a final year BSc project in Computer Science.

 

STRING PROCESSING ALGORITHM TO DETERMINE IF A GIVEN ELEMENT OF A STRING BELONG TO A KNOWN GROUP OF KNOWN ELEMENTS.

Most of these and following algorithm was originally implemented for text base string matching programs. However, they can be easily used for other forms of string processing operations such as pattern recognition on bit maps and on graph trends.

 

Image to be inserted here
 

STRING SEARCH

An algorithm that does efficient search for a sub-string within a larger string by looking for an exact match with known delimiter at the start and at the end of the sub-string.

Image to be inserted here

MORE STRING SEARCH

Algorithm that search for a sub string within a larger string with no regards to delimiters.

This algorithm also has a variant that does efficient case sensitive search on text string.

Image to be inserted here
 

STRING INSERTION

An algorithm that carefully inserts a sub string within another string. The algorithm does a check on available memory first to ensure that the operation can be completed.

Image to be inserted here
 
Select All

 

A set of well-known routines implemented in ANSI C/C++ for doing Search and String/Pattern Matching and data file processing.
Description
FLOWCHART - Control Logic
Source Languages

In this implementation, the algorithm is actually been used to do search on a Company database system to extract related data whenever the user enters a company name. The essential part of this control logic that implement the linear search is highlighted red and is nested within the last outer loop of the control logic.

Taken from "Structured Programming with ANSI C" ISBN 0-9544270-0-9


BASIC and ANSI C++

The Binary Search does search to locate an item in a list consisting of N values in time proportional to Log2(N). However, the data set must first be ordered for the algorithm to work. In comparison to the Linear Search algorithm, the average time taken to locate a single value depends on the manner in which the search data value is distributed within the set. Statistical analysis shows an expected time of O(N)

NOTE that in this algorithm I have added an extra section of control logic at the exit of the main processing loop - the yellow and dark green sections.

Use LogicCoder to convert this search algorithm to other source programming language such as VB., JavaScript and so on or just to do modification or implementation to meet your specific requirement.

Taken from "Structured Programming with ANSI C" ISBN 0-9544270-0-9

Click here to see the original source code in ANSI C/C++

 


BASIC and ANSI C++

You can modify the control-break logic so that it does any kind of switch in data processing pattern whenever a sequence of data values in a selected field(s) of records in a data file changes. The flowchart illustrated here is a simple example implementation of this system. However, you can use LogicCoder to do quick modification in more than one way to implement your own required control logic. For example, you can abstract section of the control logic and then replace the abstracted section with your own abstract control logic.

Taken from "Structured Programming with BASIC " ISBN 0-9544270-1-7

BASIC and ANSI C++
     
Taken from "Structured Programming with BASIC " ISBN 0-9544270-1-7
BASIC

Note that this control logic is against the principle of efficient program flowchart design because it uses two loops that has exactly the same form and purpose. A single loop is more appropriately efficient for implementation of the intended processes in this flowchart. For instance, the Control-Break logic can easily be used to process the sets of records that this loop logic structure is designed to process.

Taken from "Structured Programming with BASIC " ISBN 0-9544270-2-5

Using LogicCoder to highlight sections of a flowchart helps you to quickly identify inefficient implementation of problem solutions.

 

BASIC and ANSI C++

The control logic for a program that iterate through a data file with information on traffic violation. The control logic for the implemented program does processing for the number of traffic violation and their associated fines and penalties.

Taken from "Structured Programming with BASIC " ISBN 0-9544270-1-7


BASIC and ANSI C++

Here is the control logic for a function that calculates a hospital accommodation bill base on service type, patient care and patient accommodation room type. There are many other kinds of similar accommodation bill calculation services such as Hotel accommodation or Seminar accommodation or exhibition accommodation Note that this bill calculation routine uses sequential file with data stored in a database system.

NOTE that LogicCoder has special functions that you can use to highlight certain elements or section of a flowchart base on a given condition. For instance, you can choose to highlight all symbols with a selected colour that has a call of a selected function. In this case, I've highlighted all symbols that uses the printf( ) function with a bright green colour.

Taken from "Structured Programming with BASIC " ISBN 0-9544270-1-7


BASIC and ANSI C++
Taken from "Structured Programming with BASIC " ISBN 0-9544270-1-7
BASIC and ANSI C++

Control logic for processing to determine allowance for mileage done.

Taken from "Structured Programming with BASIC " ISBN 0-9544270-1-7


BASIC and ANSI C++

Control logic used to determine fees paid by campers using park facilities.

Taken from "Structured Programming with BASIC " ISBN 0-9544270-1-7


BASIC and ANSI C++
Select All

 

Special Algorithm Flowchart with Abstraction

A set of flowcharts/control logic that does input/output operations on user data mainly for the purpose of conversion

Control logic for a program that will take an input temperature value in Fahrenheit, convert it to Celsius and display the result to the user.

Taken from "Structured Programming with ANSI C" ISBN 0-9544270-0-9

Click here to see the original source code


BASIC and ANSI C++

An abstracted view of the above control logic.

LogicCoder provides you with functions that you can use to create abstracted view on selected section of a control logic. You ten convert each abstracted section of the original logic to a predefine symbol which content is replace by a function cal as illustrated here.

You can also expand this abstracted view to get back the original detail they represent.

Taken from "Structured Programming with ANSI C" ISBN 0-9544270-0-9

Click here to see the original source code


BASIC and ANSI C++

ALGORITHM TO DETERMINE AVERAGES

 

Here is an algorithm that ca be used for calculation of the Mean, Mode, and the Median of a set of numeric values after they have been place in sorted order in an array.

You can also easily modify the algorithm to determine other values such as the ranges.

IMPLEMENTATION OF THE BUBBLE SORT ALGORITHM

Control logic solution of the algorithm that implement the bubble sort algorithm for the book display application. Taken from
Taken from "Structured Programming with BASIC " ISBN 0-9544270-1-7

 

You can use this specific control logic to implement a generic form of the bubble sort by saving it as a template in LogicCoder You can then use it to implement the Sort module in the previous algorithm used to determine Averages.

 

 

Here is the flowchart of the program control logic for an algorithm that determines the maximum and the minimum values in an array of values.

Taken from "Structured Programming with BASIC " ISBN 0-9544270-1-7

NOTE that in this case, unlike the previous algorithm, you do not need to sort the values. Therefore, the time taken to perform this operation is proportional to the number of values N. I.e. it is O(N), unlike the previous algorithm where the time taken to sort the array can be as much as O(N2)

 
     
Select All

You can get copy of these flowcharts as LogicCoder source document with the original source code statements in the selected language from which you can regenerate the original source code. You can also edit the control logic and then regenerate the source code from the edited control logic.

Use of these diagrams for commercial pupose is perhibbitted under International copyright law. Use of these diagrams/images within the public domain must acknowledge their original source.

 

Copyright September 2007
Logic Code Generator
142a Shenley Road
Hertfordshire WD6
United Kingdom

Tel: +44(0)203 358 6133

You must not take information from this web page and reuse without the owner's permission!

 

 

Home | Contact Us | Online Service | Links