4. Put a check next to each item below that is a peripheral device.
_______ a. Disl drive
_______ b. Arithmetic/logic unit
_______ c. Magnetic tape drive
_______ d. Printer
_______ e. CD-ROM drive
_______ f. Memory
_______ g. Auxiliary storage device
_______ h. Control unit
_______ i. Terminal
_______ j. Mouse
5. Next to each item below, indicate whether it is hardware (H) or software (S).
_______ a. Disk drive
_______ b. Memory
_______ c. Compiler
_______ d. Arithmetic/logic unit
_______ e. Editor
_______ f. Operating system
_______ f. Object program
_______ h. Terminal
_______ i. Central processing unit
6. Means-ends analysis is a problem-solving strategy.
a. What are three things you must know in order to apply means-ends analysis toa problem?
b. What is one way of combining this technique with the divide-and-conquer strategy?
7. Show how you would use the divide-and-conquer approach to solve the problem of finding a job.
Programming Warm-Up Exercises
1. Write an algorithm for driving from where you live to the nearest airport that has regularly scheduled flights. Restrict yourself to a vocabulary of 48 words plus numbers and place names. You must select the appropriate set of words for this task. An example of a vocabulary is given in Appendix A, the list of reserved words (words with special meaning) in the C++ programming language. Notice that there are just 48 words in that list. The purpose of this exercise is to give you practice writing simple, exact instructions in an equally small vocabulary.
2. Write an algorithm for making a peanut butter and jelly sandwich, using a vocabulary of just 48 words (you choose the words). Assume that all of the ingredients are in the refrigerator and that the necessary tools are in a drawer under the kitchen counter. The instructions must be very simple and exact because the person making the sandwich has no knowledge of food preparation and takes every word literally.
3. In Exercise 1 above, identify the sequential, conditional, repetitive, and subprogram steps.