Chapter 1

Program Development

The five phases of building a program: analysis, design, coding, testing and documentation.

Writing a program is not just about typing code. Programmers follow an organised program development process so the final program actually solves the problem and is easy to fix later.

The five phases

  • Problem analysis — understand the problem and list the input, process and output needed.
  • Design — plan the solution using a flowchart or pseudocode before touching a computer.
  • Coding — turn the design into a real programming language.
  • Testing — run the program with sample data to find and correct errors.
  • Documentation — write comments and user guides so others can understand and maintain it.

Key idea

The phases run in order: analysis → design → coding → testing → documentation. Good planning in the early phases saves a lot of time later.

Why the order matters

If you skip analysis and start coding straight away, you may build a program that solves the wrong problem. Design lets you check your logic cheaply on paper. Testing then proves the code works, using both normal and unusual data to expose bugs before real users meet them.

Example

To build a program that finds the average of three marks: input = three marks, process = add them and divide by 3, output = the average. You design this as pseudocode, code it, then test it with marks like 60, 70 and 80 to check the answer is 70.

Documentation is often ignored by beginners, but it is what lets a team improve a program months later without guessing what each line does. Following all five phases turns a messy idea into a program that is correct, reliable and easy to maintain.

Stuck on this topic? A verified JomKelas tutor can walk you through it.

Find a verified tutor