Grade 11 Computer Science
The year the language changes and the thinking stays
A fifth year, in which a second language enters — not as a caprice but because the certification exam these two years prepare for is written in it. We open with the essential difference and not the syntax: a checking stage added between writing and running, and what it demands in return for catching bugs before anyone runs. From there we go over the four subjects that are genuinely new — types and their limits, strings and equality, arrays, and a collection that grows — and in each we see that the traps are not syntactic but concern what the name really holds. We then write a class in a language that enforces the boundary rather than recommending it, meet inheritance and the one test permitting it, and close with the mechanism that makes all the rest worth something: code written once that keeps working with kinds written after it. The year ends with a final exam over the whole of it.
Basic types and their limits
- Two families of type
- Division that erases the fraction
- When the number does not fit
- Converting between types
- Boolean expressions
- Common mistakes with types
- Summary practice — types
Strings and equality
- A string never changes
- Content equality against place identity
- Working with parts of a string
- Building a string in a loop
- Comparing and ordering strings
- Common mistakes with strings
- Summary practice — strings
Arrays
- A length settled at the moment of creation
- Two ways to traverse an array
- An array passed to an operation
- The standard traversals
- Changing an array while traversing
- Common mistakes with arrays
- Summary practice — arrays
Inheritance
- Extending instead of copying
- What passes on and what does not
- Replacing behaviour
- When inheritance is the wrong answer
- A hierarchy that grows
- Common mistakes with inheritance
- Summary practice — inheritance
Polymorphism and interfaces
- One call, many behaviours
- What may be called and what really runs
- A promise with no body
- Choosing between an interface and a general class
- What all this actually buys
- Common mistakes with polymorphism
- Summary practice — polymorphism
Final exam — Grade 11 Computer Science
- Final exam — Grade 11 Computer Science