Page 378 - Introduction to Programming with Java: A Problem Solving Approach
P. 378
344 Chapter 8 Software Engineering
12. False. It’s true that an instance variable persists throughout the life of an object, and if the second call of the same method were right after the first call of that method, the final value of the instance variable in the first call would be the same as the initial value in the second call of that method. However, it’s possible that some other method could change the value of the instance variable between the two calls of the method in question.
13. False. Test frequently throughout the development process.
14. False. It’s important to have a clear idea of what you expect to see before you do a test, so you will have the
best chance of recognizing a discrepancy when it occurs.
15. The top-down design methodology is the best because: a) True.
b) False. It sometimes forces people to re-invent the wheel. c) True.
d) False. If you’re worried about solving the wrong problem, use prototyping.
e) False. To minimize cost, organize the design to reuse existing components.
f) False. To maximize reliability, organize the design to reuse existing components.
16. In top-down design you decide on the classes before the public methods.
17. You should use bottom-up design when your program can utilize a substantial amount of prewritten
software or when low-level details are critical and require early attention.
18. If a prototype is successful, it’s important to resist the temptation of continuing the development by tinkering with that prototype.
19. False. Many problems need benefits of more than one design methodology. It’s a good idea to stick with one Apago PDF Enhancer
methodology through one design cycle (planning, implementation, testing and evaluation), but you might need to switch to a different methodology in the next design iteration.
20. True. The particular main method used is the one that’s current when execution starts.