AQA A-level Computer Science (7517)Specification point 4.1.2.3

AQA 7517 4.1.2.3: Object-oriented programming

The free BugBot lessons that teach this point, a robot to try it on, and the past-paper questions that test it.

What it covers

A procedural program keeps its data in variables and passes it to subroutines. That works, but nothing ties the robot's odometer total to the code that is allowed to change it: any subroutine could add to it, reset it, or set it to nonsense. Object-oriented programming (OOP) bundles data together with the subroutines that act on it, and hides the data so the only way to change it is through those subroutines.

  • Class, object, attribute, method
  • Encapsulation and information hiding
  • Class diagrams
  • In the exam languages
Read the free lesson (20 min)

Or do it in the simulator, with tasks that mark themselves

Lessons that teach it

  1. A1.7 Classes and objects Programming techniques and object-oriented programming
    Classes, objects, attributes, methods and constructors; encapsulation, access specifiers, getters and setters, and class diagrams.
  2. A1.8 Inheritance, polymorphism and overriding Programming techniques and object-oriented programming
    Subclasses and super, overriding, polymorphism, and abstract, virtual and static methods, with robot behaviours as subclasses.
  3. A1.9 Aggregation, composition and class diagrams Programming techniques and object-oriented programming
    Has-a relationships, drawing them on class diagrams, and the design principles that favour composition over inheritance.
  4. A1.10 Project: the behaviour controller Programming techniques and object-oriented programming
    Get past a wall to the dock with prioritised behaviour classes, a controller that aggregates them, and an exception to finish.

Try it on a robot

The task from A1.7 Classes and objects, running here. Change the program and press Run.

The specification is AQA's own document; this page says which of our lessons teach point 4.1.2.3 and is not endorsed by the board.