levo

Fundamentals of Programming

Programming paradigms and the procedural approach

  • 1 thing to know
  • Paper 1

Overview

Recall questions on the procedural and object-oriented paradigms, stepwise refinement, single entry and exit points, and how a hierarchy chart is drawn.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Process

Describe the characteristics of the object-oriented programming 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 organising a program, defining how a problem is broken down and how code and data are arranged. The same problem can be solved in different paradigms, and many languages support more than one.

  2. 2

    Describe the characteristics of the procedural programming paradigm.

    Model answer

    The program is written as a sequence of instructions that tell the computer what to do step by step, using sequence, selection and iteration, and it is organised into procedures and functions that are called in a defined order. Data is held in variables and data structures that are separate from the subroutines that act on them, and it is passed to them as parameters or held globally. The program is designed top-down, by breaking the overall task into subtasks.

  3. 3

    Describe the characteristics of the object-oriented programming paradigm.

    Model answer

    The program is organised as a collection of objects that interact by calling one another's methods. Each object bundles its own data with the operations that act on that data, and the data is normally kept private so it can only be reached through the object's methods. Objects are created from classes, which may be built from other classes by inheritance, and code is designed by identifying the things in the problem and their relationships rather than the steps to be carried out.

  4. 4

    State the essential difference between how the procedural and object-oriented paradigms treat data and code.

    Model answer

    In the procedural paradigm data and the subroutines that process it are separate, and data is handed to subroutines that any part of the program may call. In the object-oriented paradigm they are bundled together in objects, so the data belongs to the object and is normally reachable only through that object's own methods.

  5. 5

    What is the structured approach to program design and construction?

    Model answer

    A disciplined way of building programs in which the problem is broken down into a hierarchy of clearly defined modules or subroutines, each with a single well-defined task, one entry point and one exit point. Only sequence, selection and iteration are used to control the flow, with unconditional jumps such as GOTO avoided, and data is passed between modules through defined interfaces.

  6. 6

    What is stepwise refinement?

    Model answer

    The top-down technique of starting with a statement of the whole problem and repeatedly breaking each part into smaller subtasks, until every subtask is simple enough to be written directly as a subroutine. It produces the structure of the program before any detailed code is written.

Other ways to work this

The same content, four other ways.

What is inside Levo

Six ways to work the same material.

1Closed book
2Open book
3Closed book

The 3-step method, run for you

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

Fundamentals of Programming
Fundamentals of Data Structures
Fundamentals of Algorithms
Theory of Computation

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

A driver is .
softwarehardwarestorage

Blank Blitz makes facts automatic

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

AThe integer 5 is 0101.
B0.75 is 1/2 + 1/4.
CThe fraction bits are 1100.

Build It gets the exam shape right

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

Head means the first single element of a non-empty list.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

721941163128510

Brain Breaks between sessions

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

Every question in Fundamentals of Programming, on a schedule.

Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.

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