Use path testing to generate test cases for all the methods of the NetworkConnection class depicted in Figure 11-15 and in Figure 8-11. Expand first the source code to remove any polymorphism. How many test cases did you generate using path testing? How many test cases would you generate when the source code is not expanded?
What will be an ideal response?
The receive() and setNetworkInterface() methods would yield only one test case without expanding the source
code, since they do not have decision points. However, receive() has one polymorphic message send that could be
bound to three different classes, resulting in three test cases. setNetworkInterface() has two that could be each
independently bound to three different classes, resulting in six test cases. See Table 11-2.
You might also like to view...
In Java, a(n) ___________________ is a collection of constants and abstract methods.
a) polymorphic reference b) abstract class c) implementation d) interface e) iterator
Suppose an attacker finds a way to store an arbitrary binding in your local DNS server. How can the attacker use such a weakness to obtain your bank account information?
What will be an ideal response?
Which of the following conversion specification type codes interprets as an integer and prints as a character?
a. c b. i c. b d. d
In database terminology, a set of entities refers to a
a. field b. column c. table d. information