Grade 10 Computer Science · Objects

Summary practice — objects

Ten exercises going over everything the unit taught.

A mould, a case, a subject, a layer and a border

Five ideas, and all of them really answer one question. These exercises check whether, when you see data and an operation, you now ask who should hold what, and who will be hurt when something changes.

This unit really taught one thing: who is responsible for what. An object joins data to its operations, a class is the mould it is created from, a method is an operation with a subject, correct decomposition gives each class one layer, and a correct boundary keeps your freedom to change. The ten exercises below touch all five.

Review — the order in which an object is built

  1. A class is defined with fields and operations.
  2. The constructor initialises all the fields.
  3. Objects are created from it.
  4. Each has a separate copy of the data.
7 flashcards: a term or question on one side (An object, A class, A constructor, A method, A method’s name, Splitting into layers, An underscore at the start of a name) and the explanation on the other. They can be shuffled and marked as known.