About this worked example
This page follows one project, Canteen Pre-Order, from the first idea to the final evaluation. Sam is a Year 8 student. Sam builds a way for students to order lunch before first break and collect it at lunch.
Every focus area in this course moves through the same four stages. The table shows what Sam made in each one.
| Stage | What Sam made | Jump to |
|---|---|---|
| 1. Identifying and defining | A problem statement, parts, users, requirements, use cases and test cases | Stage 1 |
| 2. Researching and planning | Two designs, a weighted decision table, privacy decisions, a task plan and a data plan | Stage 2 |
| 3. Producing and implementing | A wireframe, a flowchart, Python code, a tiny form, a project record and a working calculator | Stage 3 |
| 4. Testing and evaluating | Test results and a fix, peer feedback, an evaluation and a review of effects | Stage 4 |
Read the example as a model, not a template. For each piece, ask: could someone who was not there use it to check or repeat the work?
Stage 1: Identifying and defining
Before anyone writes code, a project needs a clear problem. In this stage Sam writes the problem down, breaks it into parts, names the people it affects and turns wishes into rules that can be tested.
The problem statement
A problem statement says who has a problem, what goes wrong and what a solution must let them do. It does not describe the solution. Sam’s statement reads:
Notice that Sam did not write “build an app”. A paper system or a better stock sheet might solve the problem too. Choosing between options is part of the project.
Breaking the problem into parts
Decomposition means breaking a big problem into smaller parts. Each part is easier to build and test on its own. Sam’s project has four parts:
- Order screen. Students see the menu and choose a quantity for each item.
- Price calculator. Works out each line, takes off any discount and gives the total.
- Order checker. Looks at each number and gives a friendly message if something is wrong.
- Pick-up list. Shows canteen staff each order and its pick-up code, sorted by pick-up time.
Structure chart
Canteen Pre-Order: the project and its four parts
A structure chart, read from top to bottom. The project sits in the top box, and each of the four parts sits below it, joined to it by a line.
What to notice
- Each box is one part, and each part does one job. That is why each can be built and tested on its own.
- A line joins the project to each part. No part is joined to another part.
- The four boxes match the four bullet points above.
Try thisName a fifth part the project might need, such as a menu page the canteen manager can update. Write its one job in a single sentence, and say which box it would join.
Users and stakeholders
A user uses the system. A stakeholder is anyone the system affects, even if they never touch it. Sam listed both kinds of people.
| Who | Role | What they need |
|---|---|---|
| Students who order | User | An order that is quick on a phone and shows a total they can trust |
| Canteen staff | User | A pick-up list that is easy to read during a busy lunch |
| Canteen manager | Client and stakeholder | Correct totals, information for planning and no extra work for staff |
| Students who do not use a phone | Stakeholder | A way to order that does not depend on a phone |
| School leaders | Stakeholder | Privacy, safety and tools the school is comfortable using |
Functional and non-functional requirements
A functional requirement says what the system must do. A non-functional requirement says how well it must do it, such as how fast, how easy or how safe. Each requirement must be something you can check.
| ID | Functional requirement | How it will be checked |
|---|---|---|
| FR1 | A student can choose any of the five menu items and a quantity from 0 to 10 | Use the order screen with every item |
| FR2 | The system shows a line total for each item and a total for the whole order | Tests T1 to T4, against hand calculations |
| FR3 | Orders over $10.00 get $1.00 off. Orders of exactly $10.00 do not | Tests T2, T3 and T4 |
| FR4 | The system gives a friendly message when an item or quantity is wrong | Tests T5 to T8 |
| FR5 | Canteen staff can see the orders as a pick-up list | Staff read the list during a trial |
| ID | Non-functional requirement | How it will be checked |
|---|---|---|
| NF1 | A Year 8 student can place an order in two minutes or less, without help | Timed trial with three classmates |
| NF2 | The order screen works on a phone-sized screen, with no sideways scrolling | Check at a phone width |
| NF3 | The project asks for, and shows, only a first name or a pick-up code | Check every field on the form and the pick-up list |
| NF4 | Every total is correct to the cent | Compare each test result with a hand calculation |
Three use cases
A use case describes one thing a user wants to do, and the steps that follow. Sam wrote three.
| Use case | Who and why | Main steps |
|---|---|---|
| UC1 Place a pre-order | A student who wants lunch ready at the canteen | Open the order screen. Choose quantities. Read the total and any message. Place the order and note the pick-up code. |
| UC2 Check an order | The system, before a total is shown | Check each item and quantity. List any problem in plain words. The student fixes it and the order is checked again. |
| UC3 Prepare the pick-up list | Canteen staff, who need to know what to make | Open the pick-up list. Read the orders in pick-up order. Tick each order when it is collected. |
Test cases
A test case gives an input and the output you expect from it. Write the expected output before you run the test. That way you cannot change the expected answer to match a result you did not want. Sam wrote eight test cases. The lab in stage 3 runs the same eight.
| Test | Input (the order) | Expected output | What it checks |
|---|---|---|---|
| T1 | Meat pie × 1 | $4.50 | One line, no discount |
| T2 | Meat pie × 2, Bottled water × 1 | $10.50 | Subtotal $11.50 is over $10.00, so $1.00 off |
| T3 | Veggie wrap × 1, Muesli bar × 2 | $10.00 | Subtotal is exactly $10.00, so no discount (a boundary test) |
| T4 | Veggie wrap × 1, Muesli bar × 3 | $11.00 | Subtotal $12.00, so $1.00 off |
| T5 | No items (every quantity 0) | Choose at least one item. | An empty order is refused |
| T6 | Meat pie × 11 | Meat pie: pick a whole number from 0 to 10. | A quantity above the limit |
| T7 | Meat pie × 2.5 | Meat pie: pick a whole number from 0 to 10. | A quantity that is not a whole number |
| T8 | Pizza × 1 | Pizza is not on the menu. | An item that is not on the menu |
Stage 2: Researching and planning
In this stage Sam looks at options, chooses one and plans the work. Good planning uses evidence: what canteen staff said, what the menu costs and what a student can do on a phone.
Two alternative designs
A design is one possible way to solve the problem. Sam wrote two alternatives, each in the same format, so they could be compared fairly.
- Design A: paper order slips. Students fill in a slip at roll call, with items and quantities. Staff add up the slips by hand from a price list.
- Design B: an online order form. Students fill in a web page on a phone or laptop. The page works out the total and checks each number as it is typed. It also gives the canteen a list it can print.
Both designs could work. The real question is which one works better for the people who matter most.
Choosing with a weighted decision table
A weighted decision table scores each design against several criteria. Some criteria matter more than others, so each one gets a weight. Sam followed four steps:
- List the criteria, in plain words.
- Give each criterion a weight from 1 (least important) to 3 (most important).
- Score each design from 1 (poor) to 5 (very good).
- Multiply each score by its weight, then add up the results for each design.
| Criterion | Weight | Design A: paper slips | Design B: online form |
|---|---|---|---|
| Accuracy of totals | 3 | 2 × 3 = 6 | 5 × 3 = 15 |
| Ease for students | 3 | 3 × 3 = 9 | 4 × 3 = 12 |
| Privacy protection | 2 | 2 × 2 = 4 | 3 × 2 = 6 |
| Cost to the canteen | 1 | 5 × 1 = 5 | 4 × 1 = 4 |
| Time to build | 1 | 5 × 1 = 5 | 2 × 1 = 2 |
| Total (out of 50) | 10 | 29 | 39 |
Design B scored 39 out of 50, and design A scored 29, so Sam chose design B. Design B takes longer to build, so Sam will also keep paper slips as a backup for students who cannot use a phone. The scores are Sam’s own judgement, not measured results. The canteen manager should check them before the choice is final.
Privacy and safety decisions
Privacy means collecting only what is needed, and keeping it safe. Sam made these decisions before building anything:
- First names only. Students type a first name or nickname, never a surname. The pick-up list shows the first name and the pick-up code.
- No contact details. The form never asks for a phone number, an email address, a home address or a birthday.
- No payments. The project does not handle money or card details. How students pay stays the same as it is now.
- No health information. The form does not ask about allergies. A student with an allergy talks to the canteen manager directly, as now.
- Short-lived lists. The pick-up list is used on the day, then deleted or shredded after lunch.
- No logins. The prototype has no login and stores no passwords. If a login were ever added, the school’s IT team would need to approve it first.
A simple task plan
A task plan shows what needs doing, in what order and by when. Sam planned six weeks, with a check at the end of each week.
| Week | Main jobs | Finished when |
|---|---|---|
| 1 | Write the problem statement, users, requirements and test cases. Talk to the canteen manager. | Sam’s teacher has read the problem statement and the tests |
| 2 | Compare the two designs, score them and write the privacy decisions. | The decision table and the privacy list are complete |
| 3 | Build the price calculator and the order checks. Run tests T1 to T8. | Every test has been run, and any failure is written down |
| 4 | Build the order form and the pick-up list. | Noor can place an order on a phone in a trial |
| 5 | Run trials with classmates. Fix problems and run the tests again. | A new test run shows every row passing |
| 6 | Evaluate against the requirements. Write next steps. Present. | Each requirement has a judgement and some evidence |
Data to collect and who owns it
Data is any information a project uses or collects. Every set of data needs an owner: the person who decides who can see it, how it is kept and when it is deleted.
| Data | Why it is needed | How it is collected | Who owns it | Kept until |
|---|---|---|---|---|
| Menu and prices | To work out totals | Copied from the canteen’s price list | The canteen manager | The menu changes |
| Queue timings | To show the problem is real | Sam times the lunch queue on three days, with a stopwatch | Sam | The end of the project. Only a summary is shared. |
| Survey answers (no names) | To learn what students would use | A short paper survey, answered only by students who agree | Sam | The end of the project |
| Pre-order records | To prepare the food | Typed into the order form by students | The canteen manager | The end of lunch on the day |
Stage 3: Producing and implementing
Now the project gets built. Sam designed the screen and the rules first, then wrote code that follows them. The code is short on purpose, so you can run it in your head before you trust it.
The wireframe, in words
A wireframe is a plan of a screen. It shows where things go, without colours or the final look. Sam’s order screen, described in words:
- A title at the top: “Canteen pre-order”.
- One row for each of the five menu items, with the name, the price and a box for the quantity.
- A total line under the list, which changes as the quantities change.
- A message area under the total, for friendly messages.
- A large Place order button at the bottom, easy to tap with a thumb.
Wireframe
The phone order screen, as a wireframe
A wireframe is a plan of one screen. It has no colours or final look, only grey boxes. The five numbered markers match the parts in the list above.
What to notice
- Every row shows a name, a price and a quantity box, so a student can see the price before ordering.
- The total line changes as the quantities change. The message area is where friendly messages appear.
- The Place order button is large, so it is easy to tap with a thumb.
Try thisMove the Place order button to the top of the screen. Write one sentence on whether that would be easier or harder to use with a thumb, then decide where it should go.
The flowchart
A flowchart shows the steps and decisions in order. Sam used ovals for START and END, rectangles for steps, parallelograms for input and output, and diamonds for decisions. Every diamond has a Yes exit and a No exit, and each exit is labelled.
Flowchart
The order calculator, step by step
A flowchart in the standard symbols: ovals for START and END, rectangles for steps, parallelograms for input and output, and diamonds for decisions. Every diamond has a Yes exit and a No exit, and each exit is labelled. The checks and the discount follow the Python code above.
What to notice
- The order is checked before any price is worked out. A No answer sends the student back to the input, so a bad order is never priced.
- A subtotal over $10.00 gets $1.00 off. A subtotal of exactly $10.00 does not, because the rule says over $10.00.
- Both No exits from the checks loop back to the input, so the student can fix the order and try again.
Try thisFollow the arrows for two Meat pies and one Bottled water. Work out the subtotal in cents and compare your answer with the Python code, which prints 1050.
The price calculator (Python)
The price calculator works out the total. Sam keeps money in cents, so $4.50 is stored as 450. Whole numbers are exact. Decimal numbers can round in odd ways on a computer: in Python, 0.1 + 0.2 gives 0.30000000000000004.
The code below is the version after the fix in stage 4, which uses > (more than) rather than >= (at least).
# MENU holds prices in cents: 450 means $4.50
MENU = {"Meat pie": 450, "Veggie wrap": 600, "Fruit cup": 350,
"Bottled water": 250, "Muesli bar": 200}
def order_total(order):
# order is a dictionary: item name -> quantity
total = 0 # running subtotal, in cents
for item, qty in order.items():
total = total + MENU[item] * qty # one line: price x quantity
# The rule: $1.00 off only when the subtotal is MORE than $10.00
if total > 1000:
total = total - 100
return total
print(order_total({"Meat pie": 2, "Bottled water": 1})) # prints 1050, which is $10.50
Try it by hand. The order has two Meat pies (2 × 450 = 900) and one Bottled water (250). The subtotal is 1150 cents. That is more than 1000, so 100 comes off. The answer is 1050 cents, which is $10.50.
Checking an order (Python)
The order checker runs before a total is shown. It returns a list of friendly messages. An empty list means the order is fine, and the screen shows the same messages that the code returns.
def check_order(order):
# Returns a list of messages. An empty list means the order is valid.
problems = []
for item, qty in order.items():
if item not in MENU:
problems.append(item + " is not on the menu.")
elif type(qty) is not int or qty < 0 or qty > 10:
problems.append(item + ": pick a whole number from 0 to 10.")
if not problems and sum(order.values()) == 0:
problems.append("Choose at least one item.")
return problems
Try it by hand. With {"Meat pie": 11} the list holds one message, so the order is refused. With {"Meat pie": 0} nothing is wrong with the numbers, but the sum is 0, so the list holds “Choose at least one item.”. The last check only runs when nothing else is wrong, so a student never gets two messages for one mistake.
A tiny order form (HTML)
A form collects input from the user. Each box has a label that says what it is for. This form asks for a first name and a quantity for one item. The min and max settings tell the browser the allowed range, but the checker above still runs, because one setting in one place is not a full check.
<form>
<label for="first-name">First name (not your surname)</label>
<input id="first-name" type="text" maxlength="20" required>
<label for="pie-qty">Meat pie (0 to 10)</label>
<input id="pie-qty" type="number" min="0" max="10" step="1" value="0">
<button type="submit">Place order</button>
</form>
A calculator you can try
The tool below uses the same price rule and the same messages as the Python code. Change the quantities, then run the eight tests from stage 1. Try to break it: what happens with 2.5, with 11 or with a blank box? A blank box counts as 0. The tool sends nothing anywhere and keeps nothing, so the Place order button in the wireframe is not part of it.
Without JavaScript this tool cannot add up an order, but the rules are simple. The made-up menu has five items, from a $2.00 muesli bar to a $6.00 veggie wrap. Quantities must be whole numbers from 0 to 10. An order with a subtotal over $10.00 gets $1.00 off. Stage 1 lists the eight tests the tool runs.
Project record and journal
Sam keeps a project record: a short summary of what the project is and who owns each part. Each week Sam adds a dated journal entry. A journal says what was done, what went wrong and what happens next.
| Field | Entry |
|---|---|
| Project | Canteen Pre-Order (made up) |
| Owner | Sam, Year 8 |
| Client | The canteen manager |
| Status at Week 3 | Calculator and order checks built and tested. Order form started. Pick-up list not started. |
| Data held | Menu prices, queue timings and a short survey with no names |
Week 1 · Friday 18 September 2026
Met the canteen manager for twenty minutes and wrote the problem statement. Noor read it and asked who the “users” were, so I added a user table. Wrote the eight test cases before writing any code.
Week 2 · Friday 25 September 2026
Compared two designs and scored them. Design B scored 39 and design A scored 29. Wrote the privacy list: first names only, no payments and no health information. The canteen manager gave me the menu prices in writing, so the price list is checked against a source.
Week 3 · Friday 2 October 2026
Built the price calculator and the order checks. For the test order the calculator printed 1050, as I expected. I ran all eight tests and seven passed. T3 failed: an order of exactly $10.00 came out as $9.00. I had written the rule as “at least $10.00” by mistake. I have not fixed it yet, and next week I will fix it and keep both results.
Stage 4: Testing and evaluating
Testing asks whether the product does what the requirements say. Evaluating asks whether it is good enough, and what would make it better. Sam tested first, then judged the project against the requirements, then thought about its wider effects.
Test results: one failure and its fix
Sam ran the eight tests from stage 1 twice. The first run used the rule “at least $10.00”. The second run used the correct rule, “more than $10.00”. The table compares each result with the expected output.
| Test | Expected | Actual (first run) | Result |
|---|---|---|---|
| T1 | $4.50 | $4.50 | Pass |
| T2 | $10.50 | $10.50 | Pass |
| T3 | $10.00 | $9.00 | Fail |
| T4 | $11.00 | $11.00 | Pass |
| T5 | Choose at least one item. | Choose at least one item. | Pass |
| T6 | Meat pie: pick a whole number from 0 to 10. | Meat pie: pick a whole number from 0 to 10. | Pass |
| T7 | Meat pie: pick a whole number from 0 to 10. | Meat pie: pick a whole number from 0 to 10. | Pass |
| T8 | Pizza is not on the menu. | Pizza is not on the menu. | Pass |
The fix. Sam changed one symbol in the price rule. The line if total >= 1000: became if total > 1000:. T3 then gave $10.00, and all eight tests passed. Sam ran them again and kept both runs in the record.
Peer feedback
Noor, a classmate, tried the order form on her phone and read the problem statement. She gave three notes, and Sam replied to each one.
- Noor said, “The message was tiny and under the total, so I missed it.” Sam replied, “I moved the message above the total and made it a clearer colour.”
- Noor said, “I thought the $1.00 off applied to every order.” Sam replied, “The rule only applies over $10.00. I added a line on the screen that says so.”
- Noor said, “On the pick-up list I could not tell which code was mine.” Sam replied, “The list now shows the first name next to each code. I did not add surnames.”
Evaluation against the requirements
To evaluate is to judge against criteria. Sam checked each requirement from stage 1, gave a judgement and pointed to the evidence.
| Requirement | Judgement | Evidence |
|---|---|---|
| FR1 Choose items and quantities from 0 to 10 | Met | Tests T1 to T4, and the order screen |
| FR2 Line totals and a total | Met | Tests T1 to T4 match the hand calculations |
| FR3 $1.00 off only over $10.00 | Met | T3 passes after the fix, so the boundary is tested |
| FR4 Friendly messages | Mostly met | T5 to T8 pass. Noor missed the first message, so it was moved. |
| FR5 Pick-up list for staff | Not met yet | Not built. It is the next step. |
| NF1 Order in two minutes or less | Met | Timed trial: all three classmates finished in under two minutes |
| NF2 Works at phone width | Met | Checked at a phone-sized width, with no sideways scrolling |
| NF3 First names or codes only | Met | The form has one name box and no contact fields |
| NF4 Totals correct to the cent | Met | Money kept in cents, and all tests match |
Overall judgement. The calculator and the order form meet most of the requirements. The project is not finished, because the pick-up list does not exist yet. Sam would offer the system to the canteen manager as a trial, not as a finished service.
Social, ethical and cybersecurity review
A system affects people, not only computers. Sam asked three questions about the project.
| Area | The question Sam asked | What Sam decided |
|---|---|---|
| Social | Who could be left out? | Students who do not use a phone can still order on a paper slip, so the paper backup stays. |
| Ethical | Could the data be used to tease or single out a student, for example about what they buy? | The pick-up list shows first names and codes only, and it is deleted at the end of lunch. Canteen staff agreed to use it only to prepare food. |
| Cybersecurity | Could someone see or change another student’s order? | The prototype has no login and stores nothing. Before any online version is used, the school’s IT team would need to review where it is hosted and who can open the list. |
What comes next
A good project ends with a plan, not just a finish line. Sam’s next steps, in order:
- Build the pick-up list and test it during a short trial at lunch.
- Ask Noor and four other classmates to place orders while Sam watches. Write down every problem they have.
- Check the price rules with the canteen manager. Do they match what the canteen really does?
- Write a one-page guide for staff, and a short privacy note for students.
- Decide whether the paper backup is still needed after the trial.