What does it mean when we say a programmer using a function should be able to treat the function like a black box?
a) This is meaningless. One must know how a function does its job to effectively use it.
b) One must be able to rely on the description of the preconditions (requirements for use of the function) and the postconditions (promise of behavior to use the function).
c) If one codes an application that uses a function with a knowledge of the internal mechanism of that function, then when the function’s maintainer changes its internal mechanism, the application programmer could be faced with changing the application code extensively.
d) The most efficient programs are the ones that each function is designed to maximally use the internal behavior of every other function to speed up the code.
b) One must be able to rely on the description of the preconditions (requirements for use of the function) and the postconditions (promise of behavior to use the function)., and c) If one codes an application that uses a function with a knowledge of the internal mechanism of that function, then when the function’s maintainer changes its internal mechanism, the application programmer could be faced with changing the application code extensively.
a) and c) are foils, explicit non-sense. Code that is written to exploit the internals of other functions is strongly coupled, and is nearly impossible to maintain. It may be fast, but there will be no way to replace one algorithm with another and retain well behaved code.
You might also like to view...
Match the following Windows 8 programs to their brief descriptions:
I. Paint II. Notepad III. WordPad IV. Snipping Tool V. Defender A. used to create drawings and open digital pictures B. used to identify and remove viruses and spyware C. used for basic text editing D. used for basic word processing that can format text E. used to capture a screen display
Briefly explain forensic tools for social media investigations.
What will be an ideal response?
Starting more than one application at a time is known as ________.
a. workload increase b. loading foreground c. multitasking d. convergence
Which document information could you expect to find on the Statistics tab of the Properties dialog box accessed from the Advanced Properties?
a. Number of fonts used in the document. b. Number of spelling errors in the document c. Number of lines, paragraphs, and words in the document d. Margin and line spacing settings for the document.