Grade 12 Computer Science
The year that closes six
A sixth and final year. We open with two direct extensions of what you already knew — a grid that is an array of arrays, and recursion that can now also be traced exactly and costed. From there we move to the algorithms every exam asks about, and see that what distinguishes them is not the code but what is guaranteed about the part already settled. We learn to count a cost without touching a clock, and also to know when that number matters at all. We then deal with the question of how one knows the code works, and with its modest answer — one does not know, one samples, and the whole matter is sampling well. The two units after that are the skills used more than any other and almost never taught: reading someone else’s code and tracing it, and moving from a description in words to a structure of classes. We close with preparation for the exam itself, and with the question of what actually remains after six years — and it is not the syntax. The year ends with a final exam over the whole of it.
Recursion
- The same idea, another language
- Tracing a call
- Returning or accumulating
- Recursion over structures
- When recursion is preferable
- Common mistakes with recursion
- Summary practice — recursion
Searching and sorting
- Two searches and one condition
- The two simple sorts
- The sort that divides and joins
- Tracing a sort mid-way
- Which sort when
- Common mistakes with searching and sorting
- Summary practice — searching and sorting
Analysing efficiency
- Counting instead of measuring
- What may be discarded
- Three cases and not one
- Reading a cost off code that is not yours
- When to improve at all
- Common mistakes in analysis
- Summary practice — efficiency
Reading and tracing code
- Reading code that is not yours
- The trace table
- Reading a loop without running it
- Recognising a pattern instead of reading lines
- Finding a bug in someone else’s code
- Common mistakes in reading code
- Summary practice — reading code
Designing classes for a problem
- From the description to the classes
- What each class holds
- The signs that the design is wrong
- Designing for the change one expects
- The simplest design that works
- Common mistakes in design
- Summary practice — design
Towards the exam
- Two kinds of question
- Reading a multiple-choice question
- Writing an open answer
- Managing the time
- How to revise
- Common mistakes in preparation and in the exam
- Summary practice — six years
Final exam — Grade 12 Computer Science
- Final exam — Grade 12 Computer Science