Level 2 programming assessment 2026
Summative assessment
- A summative assessment is used to determine your grade for an achievement standard.
- After you submit, your work will be marked, moderated, and grades will be uploaded to KAMAR.
- It is held under real assessment conditions — any violations result in an instant Kāore i whīwhī/Not Achieved grade
Assessment conditions
- 🗓️ You have six (6) spells in which to complete your task.
- 🏫 You may NOT work on this at home.
- 🕰️ Students with the Extra Time SAC will be given 1 additional spell, if you choose to take it.
- 💬 You may not communicate with anybody other than your kaiako
- 🚻 If you need to use the bathroom, let your kaiako know
- 🚾 You will not be allocated extra time to compensate for your absence
- 🌎 You may NOT consult the web, API documentation, etc.
- You may consult:
- the resources posted to this website
- the cheat sheet
- your previous code from this and last year
- you can use the Swift documentation from Zeal (Windows, Linux) or Dash (macOS)
- on the school computers, you must use the portable version of Zeal
- on your own devices, you can use the Zeal installer
- You may consult:
- 📖 You must not submit code that you did not 100% write as your own. This includes:
- code copied from your neighbours
- code you get help with from outside sources (whānau, friends)
- code generated by a large language model (Copilot, ChatGPT, etc.)
Programming assessment criteria (Paetae/A)
Use advanced programming techniques to develop a computer program involves:
- writing code for a program that performs a specified task
- using advanced techniques in a suitable programming language
- setting out the program code clearly and documenting the program with comments
- testing and debugging the program to ensure that it works on a sample of expected cases
An advanced computer program:
- uses variables storing at least two types of data (e.g. numeric, text, Boolean)
- uses sequence, selection and iteration control structures
- takes input from a user, sensors, or other external source
- produces output
- uses two or more complex programming techniques
Advanced programming techniques
- modifying data stored in collections (e.g. lists, arrays, dictionaries)
- storing multidimensional data in collections
- creating
methods,functions, or proceduresthat use parameters and/or return values responding to events generated by a graphical user interface (GUI)using non-trivial string manipulationusing additional non-core libraries
Programming assessment criteria (Kaiaka/M & Kairangi/E)
Use advanced programming techniques to develop an informed computer program involves:
- documenting the program with appropriate names and comments that describe code function and behaviour
- following common conventions for the chosen programming language
- testing and debugging the program effectively to ensure that it works on a sample of both expected cases and relevant boundary cases
Use advanced programming techniques to develop a refined computer program involves:
- ensuring that the program is a well-structured, logical response to the specified task
- making the program flexible and robust
- comprehensively testing and debugging the program
Task
Students will develop a Swift program for a roadside kumara stall.
The stall keeps kumara in a large container, with stock measured in kilograms. Customers pull up to the side of the road, take a bag from a stack available, fill up the bags, then weigh the bags, find out how much to pay, and then put the money into a box or scan it into an EFTPOS machine.
The owner wants to find out how many kumara people are buying per bag so that they can transition to selling kumara pre-bagged for a set price. To do this, they will use the average data from the sales recorded during the run of the program; the calculation goes kumara weight sold / number of bags used = how much kumara to put in each bag
The program must allow the roadside stall owner to:
- add kumara stock to the container in kilograms (up to 50kg, the most the bin can take)
- view the current stock remaining in kilograms
- view previous sales records
- show summary information for the stall owner, including the average weight sold per bag and the average amount earned per bag
The program must allow customers to:
- record a sale by entering the total weight sold and the number of bags used
- kumara are charged at $3 per kilogram
- each bag costs 20 cents
- there are 5,000 bags maximum (this does not need to be tested)
- the least amount of kumara one can purchase is a single kumara at 100 grams
- the most amount of kumara one can purchase is the entire remaining stock, however much it is — but they must be put into bags which can hold, at most, 5 kg each
- calculate and display the kumara charge, bag charge, and total charge for the sale
- reduce the available stock when a sale is completed
Testing
You should test at least the following parts of the program, regardless of which complex programming techniques you use:
| Test | Input | Expected |
|---|---|---|
| Add stock | valid kg amount | stock increases correctly |
| Add stock | 0 or negative kg |
error shown |
| Record sale | valid weight and bag count | sale saved and total charge shown correctly |
| Record sale | weight greater than available stock | sale rejected, error shown |
| Record sale | 0 bags or negative bags |
error shown |
| Record sale | boundary weight such as 0.1 kg (100g or 1 kumara) |
correct charge calculated |
| View stock | after several additions and sales | correct remaining stock shown |
| Owner summary | several sales with different bag counts | average weight per bag shown correctly |
| Owner summary | several sales with different total weights | average amount earned per bag shown correctly |
Submission check list
Before you submit, make sure that you have:
- Committed and pushed/synced/published your code to GitHub.
- Downloaded a copy of your completed code from your GitHub repository (Code -> Local tab -> Download ZIP), and attached this to your Google Classroom assignment.
- If you only submit
main.swiftorSwiftPlayground.swift, I will not mark your work. 
- If you only submit
- Filled in the testing table with at least TWENTY (20) lines of testing.
- Turned in your Google Classroom assignment.