You only have to write the definitions for the three classes:
Here is the picture (again):
Mentally color all the boxes: