CISC 3140 FINAL QUESTIONS AND ANSWERS
What are two actions that people involved in the Therac debacle could have taken to
reduce the damage that the machine caused? - Answers :Listen 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) - Answers
:It was an X-ray radiation therapy machine used to treat cancer patients.
The Therac programmers engaged in several practices that either failed to prevent
errors - Answers :Poor 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. - Answers :False. 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 - Answers :By definition, an imperative language tells the
computer what to do
Declarative Programming - Answers :State what we want without telling the machine
how to do it.
OOP - Answers :State what we want in the form of objects
What are the three programming paradigms - Answers :Imperative, Declarative, Object-
Oriented
What is one advantage declarative programming languages have over imperative
programming languages? - Answers :a) 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
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)? - Answers :Linear accelerator that
fired electrons.
In what country was the Therac-25 manufactured? - Answers :Canada
, What was one error in the Therac software that resulted in a death? - Answers
:switching 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 - Answers :Never 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? - Answers :FDA in the USA and Health Protection Branch in Canada
Why is the Therac report of great importance to programmers - Answers :Bad software
kills people
When is it incorrect to say "A computer program is a sequence of instructions to be
executed by a computer"? - Answers :With declarative programming
Name 1 imperative, 1 declarative, and 1 object-oriented language - Answers :Imperative
- Algol-60, Javascript
Declarative - Haskel or Mircosoft Excel
Object-Oriented - Java, C, C++
Name a programming language other than C++ or Java that can be used for Object-
Oriented Programming? - Answers :Python
Give an example of a programming situation in which the C programming language
would be a language of choice? - Answers :When the program needs to be in real-time
Programming operating systems
Why is the C/C++/Java programming language a poor choice for programming scientific
applications? - Answers :complex arithmetic is poorly supported - no complex arithmetic
Why should C/Java not be used to write business programs? - Answers :C/Java does
not have precise decimal arithmetic
Why is Java not the best choice of programming language for business programs? -
Answers :It does not support decimal arithmetic. COBOL does decimal arithmetic
Why contrary to all too frequently popular opinion, are Fortran, Cobol and Prolog not
"dead languages" despite their age?( - Answers :Because they do their job well. A
language that does something well will endure.
Because they do exactly what they are designed to do and they do it well
What are two actions that people involved in the Therac debacle could have taken to
reduce the damage that the machine caused? - Answers :Listen 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) - Answers
:It was an X-ray radiation therapy machine used to treat cancer patients.
The Therac programmers engaged in several practices that either failed to prevent
errors - Answers :Poor 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. - Answers :False. 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 - Answers :By definition, an imperative language tells the
computer what to do
Declarative Programming - Answers :State what we want without telling the machine
how to do it.
OOP - Answers :State what we want in the form of objects
What are the three programming paradigms - Answers :Imperative, Declarative, Object-
Oriented
What is one advantage declarative programming languages have over imperative
programming languages? - Answers :a) 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
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)? - Answers :Linear accelerator that
fired electrons.
In what country was the Therac-25 manufactured? - Answers :Canada
, What was one error in the Therac software that resulted in a death? - Answers
:switching 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 - Answers :Never 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? - Answers :FDA in the USA and Health Protection Branch in Canada
Why is the Therac report of great importance to programmers - Answers :Bad software
kills people
When is it incorrect to say "A computer program is a sequence of instructions to be
executed by a computer"? - Answers :With declarative programming
Name 1 imperative, 1 declarative, and 1 object-oriented language - Answers :Imperative
- Algol-60, Javascript
Declarative - Haskel or Mircosoft Excel
Object-Oriented - Java, C, C++
Name a programming language other than C++ or Java that can be used for Object-
Oriented Programming? - Answers :Python
Give an example of a programming situation in which the C programming language
would be a language of choice? - Answers :When the program needs to be in real-time
Programming operating systems
Why is the C/C++/Java programming language a poor choice for programming scientific
applications? - Answers :complex arithmetic is poorly supported - no complex arithmetic
Why should C/Java not be used to write business programs? - Answers :C/Java does
not have precise decimal arithmetic
Why is Java not the best choice of programming language for business programs? -
Answers :It does not support decimal arithmetic. COBOL does decimal arithmetic
Why contrary to all too frequently popular opinion, are Fortran, Cobol and Prolog not
"dead languages" despite their age?( - Answers :Because they do their job well. A
language that does something well will endure.
Because they do exactly what they are designed to do and they do it well