Step 3 - Program Code
Step 3, program code, is the actual writing of the program, using a programming language.
- Writing the program is called coding.
- The programmer translates the logic of the pseudocode, developed in the step
2- program design, into actual program code using programming language syntax.
- The program code should be written on paper first and then typed into the computer.
TASK 1-DEFINE PROGRAM LOGIC, What are the qualities of a good program?
- It should be reliable and work under most conditions (robust).
- It should catch obvious and common input errors.
- It should be well documented.
- It should be understandable by programmers or others.
- It should use logic structures described in step 3, program design.
TASK 2- SELECTING A PROGRAM LANGUAGE, Which language should be used?
- Hundreds of programming languages can be used to write the program statements.
- Some of the more popular ones for microcomputers are BASIC, C and Java.
- Language is usually chosen by the programmer or dictated by company policy.
TASK 3- CODE OR WRITE THE PROGRAM, What is the procedure?
- Code should first be handwritten on paper or coding sheets.
- Code would follow the syntax of the chosen programming language.
- Code would then be entered into the computer.
- Example:
< Previous Page
Next Page >