1. The four paradigms
The syllabus names four programming paradigms: low-level, imperative (procedural), object-oriented and declarative. A mark scheme describes each paradigm by how its programs are written.
Low-level programs use the instruction set of a processor. Imperative programs give an explicit sequence of commands that update the program state, with or without procedure calls. Object-oriented programs use the concepts of class, inheritance, encapsulation and polymorphism. Declarative programs specify the desired result rather than how to get to it.
Examiner insight
Worked example 14 marks
Draw one line from each programming paradigm to its most appropriate description.
| Programming paradigm | Description |
|---|---|
| Programs using the instruction set of a processor | |
| Declarative | Programs based on events such as user actions or sensor outputs |
| Imperative | Programs using the concepts of class, inheritance, encapsulation and polymorphism |
| Low-level | Programs with an explicit sequence of commands that update the program state, with or without procedure calls |
| Object-oriented | Programs that specify the desired result rather than how to get to it |
- 1
Declarative: programs that specify the desired result rather than how to get to it [1]
- 2
Imperative: programs with an explicit sequence of commands that update the program state, with or without procedure calls [1]
- 3
Low-level: programs using the instruction set of a processor [1]
- 4
Object-oriented: programs using the concepts of class, inheritance, encapsulation and polymorphism [1]