Drawing Shapes

In this tutorial, we will use several classes. these are nomrally shown in a Class Diagram with attributes and methods clearly defined.

logo

Implementation

Below, you can see the Parent and the Child classes side-by-side. Make note of the following:

  • the keyword extends is used on the first line of each child's class definition to specify the parent
  • the method super is used in the child's constructor to enusre that the parent constructor is executed as the starting point for the child - this ensures inheritance

Parent Class

Children





This is a development site to gather together teaching materials for AQA A Level Computer Science. It will be changing and being remodelled throughout this year.

No data is stored on the site but cookies are used to enable the website to function properly.

© 2025 Jay Patel - Dixons Sixth Form Academy, Bradford

Contact: jpatel@dixons6a.com