Teachers' Portal  /  IGCSE Computer Science 0478  /  Algorithm design and problem-solving  /  The program development life cycle
Lesson pack · IGCSE Computer Science 0478 · 7 (1-2) · IGCSE

The program development life cycle

Plan before you code. Good programs are not typed in one go.

Student lesson Lab, full screen
At a glance

The shape of the lesson

Topic
Algorithm design and problem-solving
Syllabus reference
Cambridge IGCSE Computer Science 0478, 7 (1-2)
Level
IGCSE
Duration
45 minutes, lab-led; stretches to a 60 minute block (see the contingency notes)
Position in topic
Lesson 1 of 9 in Algorithm design and problem-solving; leads into Decomposition, structure diagrams, flowcharts and pseudocode
Central model
Fig. 1: the four stages, with iterative testing looping back during coding
Cooperative structure
Assessment
Stage 1 check and the exam-style plenary from the student lesson, plus the worksheet as the exit task
Learning objectives

By the end of the lesson, learners can

Section by section
  • Analysis: understand the problem: Before anyone designs anything, they must know exactly what the program has to do.
  • Design: plan the solution: In the design stage the programmer works out how the program will meet the requirements, before writing any real code.
  • Coding and testing: Try running a short program in the lab.
Key points to leave on the board
  • Analysis: identify the problem and requirements; abstraction; decomposition.
  • Design: decomposition, structure diagrams, flowcharts, pseudocode.
  • Coding: write the program code; iterative testing of each part.
  • Testing: test the whole program with test data.
The core visual model

One picture every idea returns to

The program development life cycle has four stages. Analysis: identify the problem and its requirements, using abstraction (keep the important details, remove the rest) and decomposition (break it into smaller parts). Design: plan the solution with structure diagrams, flowcharts and pseudocode. Coding: write the program code, with iterative testing of each part as it is written. Testing: test the finished program with planned test data.

The program development life cycle AnalysisDesign CodingTesting iterative testing identify the problemrequirementsabstractiondecomposition decompositionstructure diagramsflowchartspseudocode write program codetest each moduleas it is written whole programtested withplanned test data
Fig. 1: the four stages, with iterative testing looping back during coding
Lesson sequence

Forty-five minutes, phase by phase

TimePhaseWhat happens in the roomGrouping
0 to 5 minHook: predictOpen with the question in the title, Plan before you code.. Good programs are not typed in one go. Put the figure on the board: it is the one picture every idea in the lesson returns to.Whole class, then pairs
5 to 13 minTeach and check: Analysis: understand the problemBefore anyone designs anything, they must know exactly what the program has to do. Model the worked example Abstraction on the board, one line at a time.Whole class, then pairs
13 to 21 minTeach and check: Design: plan the solutionIn the design stage the programmer works out how the program will meet the requirements, before writing any real code. Your turn: Name the stage of the life cycle in which a flowchart is drawn, and the stage in which test data is used on the whole program.Pairs
21 to 30 minTeach and check: Coding and testingTry running a short program in the lab. Project tab 1 of the lab (Run and test a short program) and let a student drive it while the class predicts.Corners
30 to 36 minCheckThe four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong.Individual, then whole class
36 to 43 minPlenaryThe exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording.Individual, random call
43 to 45 minExit and homeworkSet the worksheet below (6 questions, 17 marks). Learners self-assess against the objectives before they leave.Individual
Timing and contingency

Protect the parts that carry the learning

The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.

Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.

Cut first if the build overruns: the last check in Coding and testing, never the check or the plenary.

In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.

Running the cooperative task

Corners

Put one answer or viewpoint in each corner of the room. Students move to the corner they agree with, justify the choice to a partner there, then hear one voice from each corner before the reveal.

The full structure, with its variations and the other twelve, is on the cooperative-learning page.

Examiner traps to pre-empt

What to head off, and how

Trap learners fall intoTeaching move that pre-empts it
Abstraction is not the same as decomposition.Abstraction removes unnecessary detail; decomposition splits the problem into smaller parts. Questions often ask you to describe one of them, so do not mix them up.
Iterative testing belongs to the coding stage: small parts are tested and corrected repeatedly while they are being written.The testing stage is when the whole program is tested with test data.
Worksheet

The program development life cycle: worksheet

6 questions, 17 marks. Written in the style of the papers; no past paper question is reproduced.

NameClassDate
Q1 · recall[4 marks]

State the four stages of the program development life cycle, in order.

Q2 · explain[2 marks]

Explain what is meant by abstraction.

Q3 · apply[3 marks]

A cinema wants a program to sell tickets online. Using decomposition, identify three sub-problems the program could be split into.

Q4 · recall[3 marks]

Identify three methods that can be used in the design stage to plan a solution.

Q5 · explain[2 marks]

Describe what happens during the coding stage.

Q6 · analysis[3 marks]

For each task, state the stage of the life cycle in which it is carried out: (a) using boundary data on the finished program; (b) deciding the program must store a customer's email address; (c) drawing a structure diagram.

Answer key and marking notes
Q1 · 4 marks
  • Analysis.
  • Design.
  • Coding.
  • Testing (all four in this order).
Q2 · 2 marks
  • Removing (filtering out) details that are not needed to solve the problem.
  • Keeping only the important / relevant details, so the problem is simpler to solve.
Q3 · 3 marks
  • Choose a film and show time.
  • Choose seats / check seat availability.
  • Take payment / produce an e-ticket (or any other sensible sub-problem, such as calculate the price).
Q4 · 3 marks
  • Structure diagrams.
  • Flowcharts.
  • Pseudocode.
Q5 · 2 marks
  • The program code is written (in a programming language) from the design.
  • Iterative testing: each module is tested as it is written, errors are corrected and it is tested again.
Q6 · 3 marks
  • (a) Testing.
  • (b) Analysis (identifying requirements).
  • (c) Design.
Quiz

6 multiple-choice questions on this lesson

From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.

Q11 mark

Which list gives the four stages of the program development life cycle in the correct order?

  • Aanalysis, design, coding, testing
  • Bdesign, analysis, coding, testing
  • Canalysis, coding, design, testing
  • Ddesign, coding, testing, analysis
Q21 mark

A developer writing an app for booking music practice rooms notes: "A student must not be able to book more than two rooms in one week." Which stage of the life cycle is this, and what is being produced?

  • AAnalysis: a requirement of the system
  • BDesign: a structure diagram of the system
  • CCoding: iterative testing of a module
  • DTesting: boundary test data for the program
Q31 mark

A program will calculate how long a pizza takes to reach a customer's house. Which detail would be removed by abstraction?

  • Athe colour of the delivery rider's helmet
  • Bthe distance from the shop to the house
  • Cthe time at which the order was placed
  • Dthe speed limits on the roads used
Q41 mark

In which stage of the program development life cycle does iterative testing take place?

  • ACoding
  • BTesting
  • CDesign
  • DAnalysis
Q51 mark

Which activity is an example of decomposition rather than abstraction?

  • ASplitting an online shop into browsing, basket and payment parts
  • BIgnoring the colour of each product when working out the postage
  • CStoring only the name, price and stock level of each product
  • DListing the tasks the shop's customers need the system to do
Q61 mark

A programmer writes a login module, finds an error, fixes it and tests the module again before starting the next one. Weeks later, the finished system is run with planned normal, abnormal and extreme data. Which description of these two activities is correct?

  • Aiterative testing during coding, then the testing stage
  • Bthe testing stage, then iterative testing during coding
  • Citerative testing during design, then the coding stage
  • Dthe testing stage both times, once per module
Quiz key
Q1: A

The problem is analysed first, then a solution is designed, then coded, then the whole program is tested. Putting design before analysis means planning a solution to a problem nobody has yet defined. Coding before design means writing code with no plan. Analysis does not come last: it is the starting point of the cycle.

Q2: A

Stating what the system must do is identifying a requirement, which happens in analysis. A structure diagram shows how the system is split into sub-systems, which is not what the note describes. Iterative testing happens while code is being written, and boundary test data is chosen to test a finished program; the note is neither code nor test data.

Q3: A

The helmet colour has no effect on the delivery time, so abstraction removes it. The distance, the order time and the speed limits all affect when the pizza arrives, so they must be kept. Removing them would make the program's answer wrong, which is the opposite of what abstraction is for.

Q4: A

During coding, each module is tested, corrected and tested again as it is written: that is iterative testing. The testing stage is where the completed program is tested as a whole with planned test data, which is a common confusion. No code exists yet in design or analysis, so there is nothing to test iteratively.

Q5: A

Breaking the shop into browsing, basket and payment is decomposition: the problem is split into smaller parts that can be solved separately. Ignoring product colour and storing only the important fields are both abstraction, because unnecessary detail is removed. Listing what users need is identifying the requirements, another analysis task but not decomposition.

Q6: A

Testing and fixing one module before writing the next is iterative testing, part of coding. Running the finished system with planned test data is the testing stage. Reversing the order mixes up which is which. No code exists in design, so iterative testing cannot happen there, and the testing stage is for the whole program, not each module as it is written.

Lab and demo

What to project

The student lesson embeds these tabs. Open them full screen on the projector; every slider has a drag handle on the stage.

Slides

Slides for this lesson

A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.

Also for this topic

Everything else you can use

Original work by the TheLucidSTEM team. The worksheet items are written in the style of the papers; no past paper question is reproduced.