ZIMFundi
Sign inJoin free

Topic 5 of 8 · Form 1

Algorithm design and problem-solving

Analysis, design, coding and testing.

Notes for this topic 1 file, in order

Create a free account to download PDFs.

  1. PDFAlgorithm design and problem-solving – Computer Science notes (Cambridge O Level)47.1 KB

The program development life cycle

Analysis, design, coding and testing.

Computational thinking

Abstraction (removing unnecessary detail), decomposition (breaking problems into smaller parts) and pattern recognition.

Representing algorithms

Structure diagrams, flowcharts and pseudocode.

Standard methods

Totalling, counting, finding maximum, minimum and average, linear search and bubble sort.

Worked example: Pseudocode to find the largest of 10 numbers.

Max ← -9999

FOR Count ← 1 TO 10

   INPUT Num

   IF Num > Max

      THEN

         Max ← Num

   ENDIF

NEXT Count

OUTPUT Max

Validation and verification

Validation: range, length, type, presence, format and check digit checks. Verification: double entry and visual check.

Test data

Normal, abnormal (erroneous), extreme and boundary data.

Trace tables

Track variable values through an algorithm to find output and identify errors.

Exam tip: In pseudocode, follow the Cambridge conventions: ← for assignment and CAPITALS for keywords.

Check yourself

  1. What is abstraction?
  2. For a mark from 0 to 100, give one extreme and one abnormal value.
  3. Which standard algorithm compares adjacent items and swaps them?
Show answers
  1. Removing unnecessary details to focus on what is important.
  2. Extreme: 0 or 100; abnormal: −5, 150 or "ten".
  3. Bubble sort.
Next topicProgramming concepts

Questions about this topic (0)

No questions about this topic yet.