WITH CORRECT ANSWERS!!
What is the purpose of the .PHONY keyword in a makefile? - ANSWERTo name a
recipe that will execute once requested/Targets that do not refer to files but are just
actions are called phony targets.
Source: https://www.gnu.org/software/make/manual/make.html#Simple-Makefile
a) Why is the Therac report of great importance to programmers (i.e. what is the fact
demonstrated by the report that should be of major importance to the approach that
should be taken when software is developed)?
b) 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. - ANSWERa) Bad software kills. if
software is not designed correctly and tested carefully and correctly you are putting
people's lives in danger.
b) Failed to properly test code; Failed to listen to user feedback.
Source: https://web.stanford.edu/class/cs240/old/sp2014/readings/therac-25.pdf
What is one reason why, despite its age and poor support for object oriented
programming, does COBOL survive as a language of choice (if not the language of
choice) for programming business applications? - ANSWERCOBOL supports
decimal arithmetic.
Write a Scheme function `build astring n` that will contruct a list of `n` copies of an
arbitrary string `astring`, where `n` is a positive integer larger than 0. Assume that
`astring` is a properly constructed list and `n` is an integer greater than 0, so not
editing the parameters is required. Hint: The function `cons item alist` adds the
element item to the left end of the list `alist`. - ANSWER(define build(lambda (astring
n) ;constructs a list with arguments/parameters
(if(= n 0) (list) ;if n is equal to 0, return a list
(cons astring (build (- n 1) ) ;cons constructs a list (cons X l) → (listof X)
)
)
)
)
What does the Subversion program do when it discovers that two programmers have
made different changes to the same line of code while that code is not in the
repository? - ANSWERNotifies both programmers, halting commits, to agree upon a
a set change for the file before committing that file.
a) What is a computer program?