levo

Recursion and Modular Programming

User defined subprograms and modular design

  • 3 things to know
  • Component 1

Overview

User defined subprogram, modular programming and interface of a module.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

What is a user defined subprogram?

Key term

What is modular programming?

Key term

Give three benefits of modular programming.

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is a user defined subprogram?

    Model answer

    A user defined subprogram is a named block of code written by the programmer. The subprogram is called by name whenever its task is needed.

  2. 2

    What is modular programming?

    Model answer

    Modular programming breaks a large problem into smaller self-contained modules. Each module performs one clearly defined task.

  3. 3

    Give three benefits of modular programming.

    Model answer

    A module can be written and tested on its own, and several programmers can work at the same time. A tested module can also be reused in later programs.

  4. 4

    How does modular design help a team of programmers work in parallel?

    Model answer

    Each module has a defined interface, so one programmer can write a module without waiting for the others. The modules are combined once each is tested.

  5. 5

    What is meant by the interface of a module?

    Model answer

    The interface is the set of parameters a module expects and the results it returns. Other modules use only the interface and never the internal code.

  6. 6

    Explain the term cohesion as applied to a module.

    Model answer

    Cohesion measures how closely the statements in a module relate to one single task. High cohesion is a sign of good modular design.

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.

Data Structures: Arrays, Records and Hash Tables
Stacks, Queues, Linked Lists and Trees
Boolean Logic and Simplification
Algorithms, Pseudo-Code and Programming Constructs

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.

KDW to HAT.
decryptsencryptscompresses

Blank Blitz makes facts automatic

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

AThe two are not the same.
BOpen source refers to the availability of the code.
CMuch open source software is free of charge.

Build It gets the exam shape right

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

Backup means the copy of the data.
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 Recursion and Modular 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.