levo

Types of Programming Language

Programming paradigms and procedural languages

  • 3 things to know
  • Component 01
Start revising · £5/month

Overview

Recall questions on programming paradigms and why more than one is needed, procedural languages and their features, object-oriented, declarative, functional, logic and event-driven paradigms, low-level languages, and multi-paradigm languages.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

Name three features you would expect to find in a procedural language.

Key term

What characterises a declarative paradigm, and how does it differ from an imperative one?

Key term

What characterises the logic paradigm?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is a programming paradigm?

    Model answer

    A style or approach to programming - a whole way of thinking about how a program should be organised and what a program fundamentally is. It determines how the problem is broken down, how data and instructions are represented and how the flow of the program is controlled, rather than merely which keywords are typed.

  2. 2

    Why is there a need for more than one programming paradigm?

    Model answer

    Different kinds of problem have different natural shapes, and a paradigm that fits the shape of the problem produces code that is shorter, clearer and less likely to be wrong. Controlling a machine step by step suits a procedural approach; modelling a system of interacting real-world things suits objects; expressing a set of facts and rules and letting the machine search suits a declarative approach; responding to unpredictable user actions suits an event-driven one. Hardware and the size of projects have also changed over time, and paradigms developed to manage the growing complexity.

  3. 3

    What characterises the procedural paradigm?

    Model answer

    The program is a sequence of instructions telling the computer step by step what to do, in a stated order, using the three basic constructs of sequence, selection and iteration. Data is held in variables that the instructions read and change, and the instructions are grouped into procedures and functions that can be called from elsewhere. It is imperative: the code says how the task is to be carried out.

  4. 4

    Name three features you would expect to find in a procedural language.

    Model answer

    Variables and data types for storing values; the control constructs of sequence, selection and iteration; subroutines - procedures and functions - with parameters and local variables; and usually arrays and other structured data types. Examples of procedural languages include C, Pascal and Python used in a procedural style.

  5. 5

    What characterises the object-oriented paradigm?

    Model answer

    The program is organised as a set of objects that each bundle together their own data and the operations that act on it, and that interact by calling one another's methods. Objects are created from classes, which act as templates, and classes can inherit from other classes. Data is deliberately hidden inside objects rather than being globally available.

  6. 6

    What characterises a declarative paradigm, and how does it differ from an imperative one?

    Model answer

    A declarative program states what is wanted rather than how to obtain it, leaving the system to work out the steps. An imperative program - procedural or object-oriented - spells out the sequence of operations. A database query that asks for all customers in a given town is declarative; a loop that examines each record in turn and adds the matching ones to a list is imperative.

Other ways to work this

The same content, four other ways.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

Processors: Structure, Performance and Types
Input, Output and Storage
Systems Software
Applications Generation

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

If it matches, the search .
succeedsfailsrestarts

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

A global variable means a variable reachable from anywhere in the program.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Types of Programming Language, on a schedule.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.