Note AcademyNote Academy

Computer Science · May / June 2025 · Paper 12 · Question 3

0478

As printed in the paper

The question as text

A programmer writes a program to store and sort all the data for the books in her home library.

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme
  • 3(a)[2]

    Any two from:

    It is easier to debug.
    Less likely to make errors.
    The program is machine independent/portable
  • 3(b)(i)[5]

    One mark for each correct term in the correct place.

    whole code
    executing
    all
    line by line
    error

    A compiler translates the whole code at once before executing it. A compiler produces an error report that displays all errors.

    An interpreter translates and executes the code line by line. An interpreter stops execution when an error is found and continues once it is corrected.

  • 3(b)(ii)[4]

    One mark for each correct function. One mark for each correct matching role description.

    Examples:

    Code editor
    Allows the programmer to write/change the program.
    Run-time environment
    Allows the user to run the code and see the output.
    Error diagnostics
    Features that can be used to find errors in the code
    Auto-completion
    A programmer starts to type a command word, and the IDE suggests option for completing it.
    Auto-correction
    If a programmer misspells a command word it is changed to the correct spelling
    Prettyprint
    The command words/identifiers are given different colours
  • 3(c)(i)[1]

    Any one from:

    Inkjet
    Laser
  • 3(c)(ii)[6]

    One mark from:

    Serial
    Parallel

    One mark from:

    Half-duplex
    Full-duplex
    Simplex

    Any four from (for descriptions matching transmission types given):

    serial

    Serial would send bits in order // serial uses only one wire.
    … so won’t be skewed // less likely to have errors
    Serial transmission speed would be adequate.

    parallel

    Parallel would transmit data faster.
    … as multiple bits are sent at the same time // … as multiple wires are used.
    For parallel, chance of skewing/errors would be low as short distance transmission only required.

    half/full duplex

    To allow data to be sent in both directions
    … so any interrupts/notifications for errors can be sent back to the computer.

    simplex

    Data only needs to be sent one direction // Data transmission doesn’t need to be two-way.
    … as the printer may not need to send errors back to the computer
  • 3(c)(iii)[4]

    A parity bit is added to each byte.
    … to make the number of 1s/0s even // that will be 1 if the number of 1s/0s is odd // that will be 0 if the number of 1s/0s is even.
    The number of 1s/0s in each byte is counted after transmission.
    If any bytes have an odd number of 1s/0s an error is detected

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.