The shape of the lesson
By the end of the lesson, learners can
- Systems and sub-systems: A games console is one system, but inside it are a controller sub-system, a graphics sub-system, a storage sub-system and more.
- Flowchart symbols: A flowchart shows each step of an algorithm in order.
- Pseudocode and an algorithm's purpose: Pseudocode writes the steps as structured code that is not tied to any one language.
- Decompose: inputs, processes, outputs, storage.
- Structure diagram: the hierarchy of sub-systems; no order or decisions.
- Flowchart: terminator, process, input/output, decision, subroutine, flow lines.
- Purpose: say what the algorithm is for in its context, then describe the processes.
One picture every idea returns to
Every computer system is made up of sub-systems, which are made up of further sub-systems. Decomposition breaks a problem into its component parts: inputs, processes, outputs and storage. A solution can be designed with a structure diagram (the hierarchy of sub-systems), a flowchart (the steps, using standard symbols) or pseudocode (the steps written as structured code).
Forty-five minutes, phase by phase
| Time | Phase | What happens in the room | Grouping |
|---|---|---|---|
| 0 to 5 min | Hook: predict | Open with the question in the title, Big problems, small parts.. Every computer system is made of sub-systems, and each sub-system is made of smaller ones. 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 min | Teach and check: Systems and sub-systems | A games console is one system, but inside it are a controller sub-system, a graphics sub-system, a storage sub-system and more. Model the worked example Decompose a problem on the board, one line at a time. | Whole class, then pairs |
| 13 to 21 min | Teach and check: Flowchart symbols | A flowchart shows each step of an algorithm in order. Your turn: Which flowchart symbol would you use for each step: (a) OUTPUT "Too high"; (b) Score >= 50?; (c) Count ← Count + 1? | Pairs |
| 21 to 30 min | Teach and check: Pseudocode and an algorithm's purpose | Pseudocode writes the steps as structured code that is not tied to any one language. Project tab 1 of the lab (Run a pseudocode program) and let a student drive it while the class predicts. Model the worked example State the purpose on the board, one line at a time. | Frayer Model |
| 30 to 36 min | Check | The 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 min | Plenary | The 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 min | Exit and homework | Set the worksheet below (6 questions, 17 marks). Learners self-assess against the objectives before they leave. | Individual |
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 Pseudocode and an algorithm's purpose, 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.
Frayer Model
Pairs fill a four-box grid for the key term: definition, characteristics, examples and non-examples. The non-examples box is where the misconceptions surface, so give it the most time.
The full structure, with its variations and the other twelve, is on the cooperative-learning page.
What to head off, and how
| Trap learners fall into | Teaching move that pre-empts it |
|---|---|
| A structure diagram is not a flowchart. | It has no decisions, loops or arrows showing order: it only shows how the system is divided into sub-systems. |
| Every decision diamond needs exactly two exits, and both must be labelled (Yes/No or True/False). | Missing labels lose marks. |
| "It inputs numbers and outputs a number" is not a purpose. | State what the algorithm is for, using the context: counting freezing days, finding the highest score, and so on. |
Decomposition, structure diagrams, flowcharts and pseudocode: worksheet
6 questions, 17 marks. Written in the style of the papers; no past paper question is reproduced.
Draw and name the flowchart symbols used for: (a) the start of a flowchart; (b) Total ← Total + Price; (c) OUTPUT Total; (d) Price > 100?
A smart thermostat keeps a room at a temperature chosen by the user. Identify one input, one process, one output and one item of storage.
A program for a school canteen lets students order lunch. Draw a structure diagram with the top-level box "Canteen ordering" and three sub-systems below it.
State the purpose of this algorithm.
Total ← 0
FOR Day ← 1 TO 7
INPUT Steps
Total ← Total + Steps
NEXT Day
OUTPUT TotalExplain one difference between a structure diagram and a flowchart.
A student draws a flowchart in which a decision diamond Age >= 18? has only one line coming out of it. Explain the error and how to correct it.
Answer key and marking notes
- (a) Terminator: rounded rectangle.
- (b) Process: rectangle.
- (c) Input/output: parallelogram.
- (d) Decision: diamond (with two labelled exits).
- Input: the temperature from the sensor (or the temperature chosen by the user).
- Process: compare the room temperature with the chosen temperature.
- Output: switch the heater on or off (or show the temperature on a display).
- Storage: the chosen (target) temperature.
- Top box "Canteen ordering" joined by lines to the boxes below it.
- Three sensible sub-systems, e.g. Log in, Choose meal, Pay.
- Drawn as a hierarchy (boxes and lines, no arrows or decisions).
- It inputs the number of steps walked on each of 7 days.
- It adds them up and outputs the total number of steps for the week.
- A structure diagram shows how a system is decomposed into sub-systems (a hierarchy).
- A flowchart shows the order of the steps of an algorithm, including decisions and loops.
- A decision must have two exits, one for each outcome.
- Add a second flow line and label the two exits Yes and No (True and False).
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.
Which flowchart symbol is used for the step Total ← Total + Price?
- Aa process (rectangle)
- Ban input/output (parallelogram)
- Ca decision (diamond)
- Da terminator (rounded rectangle)
A smart doorbell recognises family members' faces. Which of these is a process in the system?
- Acomparing the visitor's face with the stored images
- Bthe video captured by the doorbell camera
- Can alert sent to the owner's phone
- Dthe saved photos of each family member
Which statement about a structure diagram is correct?
- AIt shows how a system is broken down into sub-systems, level by level
- BIt shows the order of the steps with arrows between them
- CIt uses diamonds to show where decisions are made
- DIt is the steps of an algorithm written as structured code
What is the purpose of this algorithm?
Count ← 0
FOR Pupil ← 1 TO 30
INPUT Mark
IF Mark >= 40
THEN
Count ← Count + 1
ENDIF
NEXT Pupil
OUTPUT Count- AIt counts and outputs how many of 30 pupils scored 40 or more
- BIt adds up and outputs the marks of 30 pupils that are 40 or more
- CIt counts and outputs how many of 30 pupils scored less than 40
- DIt outputs each mark of 40 or more as soon as it is input
What value is output by the algorithm in this flowchart?
- A20
- B12
- C30
- D10
A student's flowchart draws INPUT Age in a rectangle, followed by a diamond Age >= 18? whose two exits are labelled Yes and No. What should be corrected?
- ADraw INPUT Age in a parallelogram
- BDraw the decision in a rectangle
- CRemove the Yes and No labels
- DDraw INPUT Age in a terminator
Quiz key
A calculation or assignment goes in a process rectangle. The parallelogram is only for INPUT and OUTPUT, the diamond is for a question with two exits, and the terminator marks START and STOP.
Comparing the face with stored images is a process: data is worked on. The camera video is an input, the alert to the phone is an output and the saved photos are storage.
A structure diagram is a hierarchy of the system and its sub-systems. Arrows showing the order of steps and decision diamonds belong to flowcharts, and steps written as structured code are pseudocode.
Count increases by 1 (not by Mark) whenever Mark >= 40, and is output once after the loop, so the algorithm counts the pupils scoring 40 or more. Adding the marks would need Count ← Count + Mark. The condition is >= 40, not < 40. The OUTPUT is after NEXT, so individual marks are never output.
Count takes the values 1, 2, 3 and 4 in the loop, adding 2, 4, 6 and 8 to Total, which gives 20. When Count becomes 5, Count > 4 is Yes and Total is output. Stopping after Count = 3 gives 12; carrying on to Count = 5 gives 30; adding Count instead of Count * 2 gives 10.
Inputs and outputs use the parallelogram, so INPUT Age is in the wrong symbol. The decision is correctly drawn as a diamond with two labelled exits, so changing it or removing the labels would introduce errors. A terminator is only for START and STOP.
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 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.