Chapter 7
Computer Science Illuminated · 19 exercises
Problem 3
For Exercises 1-6, match the problemsolving strategy with the definition or example. A. Ask questions B. Look for familiar things C. Divide and conquer Strategy used in the binary search algorithms
4 step solution
Problem 5
For Exercises 1-6, match the problemsolving strategy with the definition or example. A. Ask questions B. Look for familiar things C. Divide and conquer Strategy used in the Quicksort algorithm
3 step solution
Problem 7
For Exercises 7-10, match the phase with its output. A. Analysis and specification phase B. Algorithm development phase C. Implementation phase D. Maintenance phase Working program
4 step solution
Problem 11
For Exercises 11-15, match the term with the definition. A. Information hiding B. Abstraction C. Data abstraction D. Procedural abstraction E. Control abstraction The practice of hiding the details of a module with the goal of controlling access to the details of the module.
3 step solution
Problem 16
For Exercises 16-36, mark the answers true or false as follows: A. True B. False Count-controlled loops repeat a specific number of times.
3 step solution
Problem 37
Exercises 37-62 are short-answer questions. List the four steps in Polya's How to Solve It list.
4 step solution
Problem 40
Apply the problem-solving strategies to the following situations. a. Buying a toy for your four-yearold cousin b. Organizing an awards banquet for your soccer team c. Buying a dress or suit for an awards banquet at which you are being honored
5 step solution
Problem 42
What is an algorithm?
3 step solution
Problem 46
Describe the steps in the algorithm development phase.
6 step solution
Problem 50
We said that following a recipe is easier than developing one. Go to the supermarket and buy a vegetable that you have not cooked (or eaten) before. Take it home and develop a recipe. Write up your recipe and your critique of the process. (If it is good, send it to the authors.)
5 step solution
Problem 51
Describe the top-down design process.
6 step solution
Problem 52
Differentiate between a concrete step and an abstract step.
4 step solution
Problem 53
Write a top-down design for the following tasks. a. Buying a toy for your four-yearold cousin b. Organizing an awards banquet for your soccer team c. Buying a dress or suit for an awards banquet at which you are being honored
5 step solution
Problem 54
Write a top-down design for the following tasks. a. Calculating the average of ten test scores b. Calculating the average of an unknown number of test scores c. Describing the differences in the two designs
3 step solution
Problem 55
Write a top-down design for the following tasks. a. Finding a telephone number in the phone book b. Finding a telephone number on the Internet c. Finding a telephone number on a scrap of paper that you have lost d. Describe the differences among these designs.
4 step solution
Problem 56
Distinguish between information and data.
3 step solution
Problem 57
Write a top-down design for sorting a list of names into alphabetical order.
5 step solution
Problem 58
a. Why is information hiding important? b. Name three examples of information hiding that you encounter every day.
5 step solution
Problem 59
An airplane is a complex system. a. Give an abstraction of an airplane from the view of a pilot. b. Give an abstraction of an airplane from the view of a passenger. c. Give an abstraction of an airplane from the view of the cabin crew. d. Give an abstraction of an airplane from the view of a maintenance mechanic. e. Give an abstraction of an airplane from the view of the airline's corporate office.
5 step solution