2. (a) In Example 7.23, suppose that condition C2 at line 12 is incorrectly coded as: 12 if((z * z > y) and (prev==“East”)) Will the execution of P7.14 against t5 reveal the error? (b) Now suppose that in Example 7.23, condition C3 at line 14 is also incorrectly coded as: 12 else if (z * z ≤ y) or (current==“South”)) Note that there are two erroneous statements in the program. Will the execution of the erroneous P7.14 against t5 reveal the error? (c) Construct a test case that will cause the erroneous P7.14 to produce an incorrect output thereby revealing the error. (d) What errors in the requirements will likely be revealed by each of the tests t5,t6, ... ,t9 in Example 7.23?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here