Titlebar
Home FAQ and Resources Unit F451 Computer
Fundamentals

Unit F452 Programming
Techniques and logical Methods

Unit F453 Advanced
Computer Theory
Unit F454 Computing
Project


F452 Programming techniques and logical methods

F452 Tests and challenges

3.2.1 Designing solutions
   - Good interface design
   - Forms, I/O screens & reports
   - Data requirements
   - Pros of modular design
   - Produce modular designs
   - Produce algorithms
   - Program flowcharts
   - Use pseudo-code
   - Implement algorithms
   - RAD

 
3.2.2 Procedural programs
   - Programming terms
   - Programming constructs
   - Selection
   - Iteration
   - Nesting
   - Subroutines
   - Recursion
   - Tracing recursive routines
   - Iterative v recursive routines
  
3.2.3 Data types and structures
   - Data types
   - Arrays
   - Data types and structures
   - Record formats
   - Modes of file access
   - Searching files for data
   - File sizes
   - File operations


3.2.4 Common facilities
   - Assignments
   - Arithmetic operators
   - Relational operators
   - Boolean operators
   - Precedence
   - Evaluate expressions
   - String manipulation
   - Using character codes
   - Input and validate data
   - Output and format data

3.2.5 Maintaining programs
   - More programming terms
   - Good program writing
   - Declarations and scope
   - Identifier names
   - Constants
   - Initialisation
   - Modularised programs
   - Annotate and comment
   - Indentation and formatting

3.2.6 Test and run solutions

   - Types of errors
   - Identify and correct errors
   - Testing strategies
   - Test data
   - Dry runs
   - Debugging tools
   - Installation routines

 


 




3.2.1 g - Flowcharts

Introduction
There are a number of ways to write an algorithm. One way is to use a flowchart. We will describe the symbols used in a flowchart and give an example of their use.

Symbols
The following symbols are the most common ones used in flowcharts, although there are others and if you read around this topic, you may find slight variations in their use.

a

An example of a flowchart
Suppose you had to write an algorithm to input two numbers and output them in size order, with the smallest one first. A flowchart describing this is as follows:

b

Follow the flow when you enter 5 and then 10 (so A = 5 and B = 10).
Now follow the flow when you enter 10 and then 5 (so A = 10 and B = 5).

We begin and end with the Start / End symbol. We then have to input some data. We then do a test. There are two outcomes to the test, yes or no (TRUE or FALSE). Depending on the result of the test, we set two variables. We then output them and stop.

An example of a FOR loop and using subroutines
Suppose you had to carry out a set of instructions a fixed number of times. In programming code, you would use a FOR loop for this. But stepping back for a moment, how might you represent this as a flowchart?

c

There are some useful tools for making flowcharts around. There is a drawing toolbar in both Word and OpenOffice that can be used for drawing neat flowcharts. Meesoft's 'Diagram Designer' is also excellent (and free). If your school has Logicator, that's also an excellent way of getting experience producing good flowcharts.

Q1. Apart from the ones in the table above, describe 4 more symbols that you might find and use in a program flowchart.
Q2. Draw a flowchart that would represent a Repeat ..... Until <condition> construct.
Q3. Draw a flowchart that would represent a While <condition> ..... EndWhile construct.
Q4. Draw a flowchart that inputs a mark out of a hundred and calculates and displays a grade depending on the mark: >80 = A*, >70 = A, > 60 = B, >50 = C, >40 = D, >30 = E and under 30 is an F.

 
 

 

V7.0 Copyright theteacher.info Ltd 2002 - 2011