A programming paradigm is a fundamental style or approach to programming. AQA 7517 requires knowledge of four paradigms:
| Paradigm | Core idea | Examples |
|---|---|---|
| Procedural | Step-by-step instructions; uses procedures/functions, loops, conditionals | C, Pascal, early BASIC |
| Object-Oriented (OOP) | Models the world as objects with state and behaviour | Python, Java, C++ |
| Functional | Programs as mathematical functions; avoids side effects | Haskell, Erlang |
| Declarative / Logic | Describes WHAT to compute, not HOW | SQL, Prolog |
Procedural programming executes instructions in sequence, using:
Structured design (also called top-down design or stepwise refinement) is the process of breaking a large problem into smaller, manageable sub-problems. Each sub-problem is solved independently and then combined.
Start with the high-level problem and repeatedly decompose it into sub-tasks until each task is simple enough to be implemented directly. Also called stepwise refinement.
A structure chart is a visual representation of top-down design. It shows:
Example: A program to process student marks might have a top-level module that calls: input marks, calculate average, output results, generate report.
| Benefit | Explanation |
|---|---|
| Easier to write | Each module is small and focused on a single task |
| Easier to test | Modules can be tested in isolation (unit testing) |
| Easier to maintain | Changes are isolated to specific modules |
| Code reuse | Modules can be called from multiple places or reused across projects |
| Team development | Different team members can work on different modules simultaneously |
| Abstraction | Higher-level modules don't need to know how lower-level modules work |
| Feature | Procedural | Object-Oriented |
|---|---|---|
| Organisation | Around procedures/functions | Around objects (data + behaviour) |
| Data | Passed between procedures | Encapsulated within objects |
| Code reuse | Calling procedures multiple times | Inheritance and polymorphism |
| Best for | Sequential, algorithm-focused tasks | Complex systems modelling real-world entities |
8 questions · instantly marked · AQA 7517 standard
| Term | Definition |
|---|
10 questions · 10 minutes