The fundamental rule for testing functions requires that every function be tested in an already fully tested and debugged program. How can this be accomplished?
a. Impossible! The main function must have all the functions it calls attached to get it to compile and run properly.
b. The main function is tested with stub functions replacing each` function.
c. Write drivers for the stub functions to test them.
d. Add each non-stub function in turn for testing.
e. Write drivers for the function implementations one at a time to test them independently.
b) d) and e) are correct.
Explanation: a) is unreasonably pessimistic. The stubs in b) should be short enough that their correctness may reasonably assumed, hence c) is unreasonable, if possible. In d) we add just one function at a time, and may need to change other stubs to vary data passed to successive functions. If inconvenient to have a main program to drive the function, a driver that provides typical data to a call is an alternative.
You might also like to view...
Which of the following statements are true?
a. A File object encapsulates the properties of a file or a path, but does not contain the methods for reading/writing. b. You can use the PrintWriter class for outputting text to a file. c. You can use the Scanner class for reading text from a file. d. An input object is also called an input stream. e. An output object is also called an output stream.
Match the following terms to their meanings:
I. Field labels A. Contains boxes for different PivotTable parts II. Area Section B. Excel table that can show the same data in more than III. Values area one arrangement IV. PivotTable report C. PivotTable area that summarizes quantitative data V. Report Filter D. Identify the categories of data in each column E. Used to restrict the data displayed
The script in the dynamic data section of the Web page template will check the value of the ____ array to determine which page to display, assuming the name being passed is ‘page'.
A. $_GET['page'] B. $_POST['page'] C. $_PAGE['page'] D. $SUBMIT['page']
?Office Mix is a __________
Fill in the blank(s) with the appropriate word(s).