Chapter7
1. We call a statement in any language a computed case type of statement if it branches to one of several areas in the program, depending on the value of a variable. Discuss the positive and negative aspects of a computed case statement. In particular, how does it affect control How? Maintainability? Re-usability?
2. If one person has written a component but others have revised it, who is responsible if the component fails? What are the legal and ethical implications of reusing someone else’s component?
5. You are asked to write a program to print out a yearly calendar. The user enters the year desired, and the output is a calendar for that year. Discuss how the representation of internal data will affect the way in which the program is written. Give several examples of data structures that might be used in such a problem. (Hint: Are your data structures cumulative or not? How is a leap year handled?)
8. Look at a program you have submitted as a project in another class. Can it be improved by using the suggestions in this chapter? If so, how? Does incorporating these suggestions make your program more or less efficient?
9. What are the advantages and disadvantages of using the same standardized language or tools across all applications in your organization?
Chapter8
7. See files
10. A program is seeded with 25 faults. During testing, 18 faults are detected, 13 of which are seeded faults and 5 of which are indigenous faults. What is Mills’s estimate of the number of indigenous faults remaining undetected in the program?
11. You claim that your program is fault-free at a 95% confidence level.
Your test plan calls for you to test until you find all seeded faults. With how many faults must you seed the program before testing in order to substantiate your claim? If for some reason you do not intend to find all seeded faults, how may seeded faults does the Richards formula require?