Skip to main content
EnglandComputer ScienceSyllabus dot point

How do procedures and the object-oriented features of classes, inheritance and polymorphism structure larger programs?

Procedural and object-oriented programming: subroutines (procedures and functions) with parameters and return values, and the object-oriented concepts of classes and objects, encapsulation, inheritance and polymorphism.

An Eduqas Component 1 answer on programming paradigms: procedures and functions with parameters passed by value or reference, and the object-oriented concepts of classes, objects, encapsulation, inheritance and polymorphism, with their benefits for large programs.

Generated by Claude Opus 4.814 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Examples in context
  4. Try this

What this dot point is asking

Eduqas wants you to describe subroutines (procedures and functions, parameters, return values, and passing by value or reference) and the object-oriented concepts of classes and objects, encapsulation, inheritance and polymorphism, with their benefits for building and maintaining large programs.

The answer

Subroutines, parameters and return values

Classes, objects and encapsulation

Inheritance and polymorphism

Examples in context

Procedural decomposition into subroutines is how every non-trivial program is organised, and parameter passing is exactly why a sorting routine can work on any array you hand it. OOP underpins most large software: a game models players, enemies and items as objects; a banking system models accounts and transactions. The Eduqas project (Component 3) is usually built in an OOP or modular style, and these concepts connect to the functional paradigm in Component 2, which takes a deliberately different, stateless approach.

Try this

Q1. State one difference between a function and a procedure. [1 mark]

  • Cue. A function returns a value (used in an expression); a procedure does not return a value.

Q2. Define encapsulation. [2 marks]

  • Cue. Bundling an object's data and methods together, keeping the data private and accessing it only through the object's public methods.

Q3. What does inheritance allow a subclass to do? [1 mark]

  • Cue. Reuse (inherit) the attributes and methods of its superclass, and add or override its own.

Exam-style practice questions

Practice questions written in the style of WJEC Eduqas exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

Eduqas 20204 marksExplain the difference between a procedure and a function, and the difference between passing a parameter by value and by reference.
Show worked answer →

Procedure versus function (up to 2 marks): a function returns a single value to the calling code and is used in an expression; a procedure carries out a task but does not return a value (it may produce output or change state).

By value versus by reference (up to 2 marks): passing by value sends a copy of the data, so changes inside the subroutine do not affect the original; passing by reference sends the address of the data, so changes inside the subroutine do affect the original variable.

Markers reward the return-value distinction for procedure versus function, and the copy-versus-address distinction for the parameter passing.

Eduqas 20226 marksDescribe the object-oriented concepts of encapsulation, inheritance and polymorphism, giving an example of each in the context of a class `Vehicle` with subclasses `Car` and `Motorbike`.
Show worked answer →

Encapsulation (up to 2 marks): bundling data (attributes) and the methods that act on it inside a class, with attributes kept private and accessed through public methods (getters and setters). Example: Vehicle holds a private speed attribute changed only via an accelerate() method.

Inheritance (up to 2 marks): a subclass inherits the attributes and methods of its superclass and may add its own. Example: Car and Motorbike both inherit speed and accelerate() from Vehicle, and Car adds numberOfDoors.

Polymorphism (up to 2 marks): the same method name behaves differently depending on the object's class, often by a subclass overriding a method. Example: a describe() method is overridden so Car and Motorbike each produce their own description.

Markers reward a correct definition and a relevant Vehicle/Car/Motorbike example for each of the three concepts.

Related dot points

Sources & how we know this