CISC 3140 EXAM 1 QUESTIONS & ANSWERS
What did therac-25 do? - answers :radiation therapy machine that provided direct
electron beam therapy & megavolt x-ray therapy
Name some therac-25 errors - answers :-flags weren't properly maintained
-programmers did not listen to the end user
-used increment instead of set
What is structured programming? - answers :a discipline based on a theorem that says
that only 3 constructs are needed to write any program
What are the 3 constructs of structured programming? - answers :1. Definition of
function & binding of names
2. Execution
3. Decision (if/else/then)
What is agile programming? - answers :you can change the specs without approval,
used for "firefighting"
What is successive programming? - answers :you can take up a problem and split it into
smaller problems
What are the 3 types of languages? - answers :-imperative
-declarative
-object oriented
What does an imperative language do & give an example - answers :-it tells the
machine what to do
-c
What does a declarative language do & give an example - answers :-tells the machine
what it expects (a functional language)
-haskell, ocaml
What does an object oriented language do & give an example - answers :-is a middle
ground between declarative and imperative
-java, python
Whats the difference between git & subversion repositories? - answers :-git is a
distributed repository, many developers can work without sharing a network
-subversion is monolithic, you need to commit directly to the svn server
Why is therac-25 important for future programmers? - answers :-shows that bad
software can kill people
, -programmers should listen to user complaints
What were some bad practices in programming therac-25? - answers :-the code wasn't
documented properly
-the programmers reused old code
70% of countries business goes through ______ - answers :cobol
Why is cobol good for business programming? - answers :-facilities aimed at
commercial application
-strong documentation
-supports decimal arithmetic
What is backus-naur form? - answers :a meta-language
What is backus-naur used for? - answers :it's a language used to describe the syntax of
languages used in algol60
What does the command "svn add" do ? - answers :gives subversion control of the file,
does not add the file to the repository, does not move the file
What does the command "svn admin create" do ? - answers :it creates the monolithic
repository
What does the command "svn import" do ? - answers :adds files to the repository,
transfers data into the directory
What's the purpose of gprof? - answers :to format profiling information in a clear and
logical report
Why do we use make? - answers :to construct large objects out of a collection of small
objects
What are the advantages and disadvantages of using make? - answers :advantages:
updates only when you need to
Disadvantages: can get hairy, difficult to write the control file
Give an example of a makefile line - answers :a.out: x.o y.o z.o
gcc x.o y.o z.o -o a.out
What does make test do when it is run, and what will it do after the tests? - answers :-
tests to see if the file is there
-if yes, it will check the timestamps of each file
-if no, it will create the file
If a.out does not exist... - answers :execute the recipe
What did therac-25 do? - answers :radiation therapy machine that provided direct
electron beam therapy & megavolt x-ray therapy
Name some therac-25 errors - answers :-flags weren't properly maintained
-programmers did not listen to the end user
-used increment instead of set
What is structured programming? - answers :a discipline based on a theorem that says
that only 3 constructs are needed to write any program
What are the 3 constructs of structured programming? - answers :1. Definition of
function & binding of names
2. Execution
3. Decision (if/else/then)
What is agile programming? - answers :you can change the specs without approval,
used for "firefighting"
What is successive programming? - answers :you can take up a problem and split it into
smaller problems
What are the 3 types of languages? - answers :-imperative
-declarative
-object oriented
What does an imperative language do & give an example - answers :-it tells the
machine what to do
-c
What does a declarative language do & give an example - answers :-tells the machine
what it expects (a functional language)
-haskell, ocaml
What does an object oriented language do & give an example - answers :-is a middle
ground between declarative and imperative
-java, python
Whats the difference between git & subversion repositories? - answers :-git is a
distributed repository, many developers can work without sharing a network
-subversion is monolithic, you need to commit directly to the svn server
Why is therac-25 important for future programmers? - answers :-shows that bad
software can kill people
, -programmers should listen to user complaints
What were some bad practices in programming therac-25? - answers :-the code wasn't
documented properly
-the programmers reused old code
70% of countries business goes through ______ - answers :cobol
Why is cobol good for business programming? - answers :-facilities aimed at
commercial application
-strong documentation
-supports decimal arithmetic
What is backus-naur form? - answers :a meta-language
What is backus-naur used for? - answers :it's a language used to describe the syntax of
languages used in algol60
What does the command "svn add" do ? - answers :gives subversion control of the file,
does not add the file to the repository, does not move the file
What does the command "svn admin create" do ? - answers :it creates the monolithic
repository
What does the command "svn import" do ? - answers :adds files to the repository,
transfers data into the directory
What's the purpose of gprof? - answers :to format profiling information in a clear and
logical report
Why do we use make? - answers :to construct large objects out of a collection of small
objects
What are the advantages and disadvantages of using make? - answers :advantages:
updates only when you need to
Disadvantages: can get hairy, difficult to write the control file
Give an example of a makefile line - answers :a.out: x.o y.o z.o
gcc x.o y.o z.o -o a.out
What does make test do when it is run, and what will it do after the tests? - answers :-
tests to see if the file is there
-if yes, it will check the timestamps of each file
-if no, it will create the file
If a.out does not exist... - answers :execute the recipe