levo

Producing Robust Programs

  • 3 subtopics
  • 9 things to know
  • J277/02

What Producing Robust Programs covers

Producing Robust Programs is examined in J277/02, Computational thinking, algorithms and programming. It covers defensive design, input validation and authentication, writing maintainable code and testing, errors and test data.

Where it is assessed

J277/02

Computational thinking, algorithms and programming, 1 hour 30 minutes and 50% of the GCSE.

Check the OCR specification ↗

The 3 subtopics

Each one has its own page.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

What do presence, length, type and format checks each test?

Key term

What is input validation, and what does a range check test?

Key term

Give three ways a user might misuse a program that asks for their age.

Key term

What does it mean for a program to be maintainable?

Key term

What is the purpose of testing a program?

Key term

Why does maintainability matter for a real software product?

Key term

What is iterative testing?

Key term

How does dividing code into sub programs make it easier to maintain?

Key term

What is final, or terminal, testing?

Take Producing Robust Programs further

The same content, four other ways.

Commonly confused

Pairs that lose marks when they are blurred together.

  • Validation vs Verification

    Validation: an automatic check that input obeys set rules before it is accepted. Verification: a check that data was entered or copied exactly as intended.

  • Syntax error vs Logic error

    Syntax error: a mistake in the grammar of the code that stops it being translated. Logic error: a mistake that lets code run but gives an unexpected result.

  • Iterative testing vs Final testing

    Iterative testing: checking each module repeatedly while the program is still being developed. Final testing: checking the complete program once development has finished.

Questions from this topic

Each one with the model answer underneath.

  1. 1

    What is defensive design?

    Model answer

    Defensive design means planning a program so it copes with every likely input and with misuse. The program should keep working and stay secure.

  2. 2

    What does anticipating misuse involve?

    Model answer

    A programmer predicts how users might misuse the program, by mistake or on purpose. The code is then written to handle each case safely.

  3. 3

    Give three ways a user might misuse a program that asks for their age.

    Model answer

    A user might leave the input blank. A user might type letters such as "ten". A user might enter an impossible value such as −5 or 250.

  4. 4

    What is input validation?

    Model answer

    Input validation is an automatic check that data follows set rules before the program accepts it. Data that fails the check is rejected and the user is asked again.

  5. 5

    What does a range check test?

    Model answer

    A range check tests that a value lies between a lowest and a highest limit. An example is a percentage that must be from 0 to 100.

  6. 6

    What do a presence check and a length check test?

    Model answer

    A presence check makes sure a field has not been left empty. A length check makes sure the input has an allowed number of characters, such as at least 8.

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.

Systems Architecture
Memory and Storage
Computer Networks, Connections and Protocols
Network Security

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 bit is the unit of data.
smallestlargestmain

Blank Blitz makes facts automatic

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

AThe sum 0 + 0 is 0, and 0 + 1 is 1.
BThe sum 1 + 1 is 0 carry 1.
CThe sum 1 + 1 + 1 is 1 carry 1.

Build It gets the exam shape right

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

Integer means a whole number with no fractional part.
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.

Producing Robust Programs revision questions

What does Producing Robust Programs cover in OCR GCSE Computer Science?
3 subtopics: defensive design, input validation and authentication, writing maintainable code and testing, errors and test data. Each one has its own page with questions and model answers.
How is Producing Robust Programs organised?
By the OCR J277 specification, subtopic by subtopic, so it matches the order you are taught it in.

Every question in Producing Robust Programs, 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.