levo

Recursion and Modular Programming

User defined subprograms and modular design

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

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.

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.

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

Cram the night before, weakest topic first

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

KDW to HAT.
decryptsencryptscompresses

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.

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