Construct related objects for a given problem.


Teaching Note:

In examinations problems will require the students to construct definitions for no more than three objects (JSR: I would say "classes", not "objects") and to explain their relationships to each other and to any additional classes defined by the examiners.

LINK Connecting computational thinking and program design.

AIM 4 Applying thinking and algorithmic skills to resolve problems.

Sample Question:


JSR Notes:

"Construct related objects for a given problem"

This is where you will be given a certain problem/context, and you will decide how best to use abstraction to deconstruct the problem into sub-problmes, i.e. classes, and determine various useful relationships between those classes. There are lots of examples of this process here in Option D, and there will be lots more as we move foward. For example, see the "Bus" example of the sample Paper 2 exam, and any other Paper 2 past papers.

And already, with what we have done, you can take a look back at the example on D.1.4 which has four classes defined. And D.1.6 notes also has a couple of examples of objects/classes which have been chosen to address a certain larger problem.


Construction Steps

So on a test/exam, based on a certain new situation you will be asked to come up with:
- the decomposition of the problem, i.e. division of the overall problem into classes,
- that class structure's verticle heirarchy, if there are inheritance (i.e. "is-a") relationships,
- and any other connections between the classes, including "has a" and "uses" relationships.


Example Problem
: Management of a bank's ATM application (keeping it to three classes only)


Example Problem: Management of a Soccer Team (being more realistic with more than three classes)


Example Problem: Keeping track of High School student attendance


Example Problem: Managing grades of students at a school


Or any other complex entity which could be defined by objects that make it up.


* In fact, do note that limiting the system to 3 classes makes the exercise trickier than it otherwise would be...