answers 2024/2025
What are two actions that people involved in the Therac debacle could have taken to reduce the damage
that the machine caused? - ANSWERSListen to and investigate the end-user complaints
Test software successively and refine the old code, instead of relying on old code.
What kind of machine was the Therac-25? (What was the machine used for) - ANSWERSIt was an X-ray
radiation therapy machine used to treat cancer patients.
What kind of machine was the Therac-25 (be careful here, the question is not what was the machine
used for, but what did it actually do)? - ANSWERSLinear accelerator that fired electrons.
In what country was the Therac-25 manufactured? - ANSWERSCanada
What was one error in the Therac software that resulted in a death? - ANSWERSswitching too fast
caused it to not be able to adjust to new setting
The Therac programmers engaged in several practices that either failed to prevent errors from being
included in production code or failed to repair programming errors when incorrect program behavior
was detected. Briefly state what two of those detrimental practices were - ANSWERSNever listen to end-
user complaints
They did not properly test the software and failed to prevent errors
They denied the errors could exist and failed to repair them.
What was one government agency that was involved with dealing with Therac-25 problems? -
ANSWERSFDA in the USA and Health Protection Branch in Canada
Why is the Therac report of great importance to programmers - ANSWERSBad software kills people
, The Therac programmers engaged in several practices that either failed to prevent errors -
ANSWERSPoor documentation. They did not listen to the end-user. Insufficient testing
True or False? Replacement of a hardware lockout in a computer-controlled machine by software will
always result in faulty machine operation. - ANSWERSFalse. We need to verify the new hardware is
compatible with the software. If the hardware is compatible, the only limitation is the implementation of
the software.
Imperative Programming - ANSWERSBy definition, an imperative language tells the computer what to do
Declarative Programming - ANSWERSState what we want without telling the machine how to do it.
OOP - ANSWERSState what we want in the form of objects
What are the three programming paradigms - ANSWERSImperative, Declarative, Object-Oriented
What is one advantage declarative programming languages have over imperative programming
languages? - ANSWERSa) declarative programming languages will figure out how to do the task by
themselves as opposed to imperative programming languages that would have to program how to do
the task.
b) It hides the machine. Instead of deciding how to do something, the programmer can focus on what
they want done
c) Declarative languages let go of memory constrain
When is it incorrect to say "A computer program is a sequence of instructions to be executed by a
computer"? - ANSWERSWith declarative programming
Name 1 imperative, 1 declarative, and 1 object-oriented language - ANSWERSImperative - Algol-60,
Javascript
Declarative - Haskel or Mircosoft Excel
Object-Oriented - Java, C, C++