|
|
|
|
|
|
|
means-ends analysis, dividing the problem into subproblems, using existing solutions to small problems to solve a larger problem, merging solutions, and paraphrasing the problem in order to overcome a mental block. |
|
|
|
|
|
|
|
|
The computer is widely used today in science, engineering, business, government, and the arts. Learning to program in C++ can help you use this powerful tool effectively. |
|
|
|
|
|
|
|
|
The Quick Check is intended to help you decide if you've met the goals set forth at the beginning of each chapter. If you understand the material in the chapter, the answer to each question should be fairly obvious. After reading a question, check your response against the answers listed at the end of the Quick Check. If you don't know an answer or don't understand the answer that's provided, turn to the page(s) listed at the end of the question to review the material. |
|
|
|
|
|
|
|
|
1. What is a computer program? (p. 3) |
|
|
|
|
|
|
|
|
2. What are the three phases in a program's life cycle? (p. 3) |
|
|
|
|
|
|
|
|
3. Is an algorithm the same as a program? (p. 4) |
|
|
|
|
|
|
|
|
4. What is a programming language? (p. 6) |
|
|
|
|
|
|
|
|
5. True or False: Creating documentation is an important part of the programming process, (p. 8) |
|
|
|
|
|
|
|
|
6. What are the advantages of using a high-level programming language? (p. 11) |
|
|
|
|
|
|
|
|
7. What does a compiler do? (p. 11) |
|
|
|
|
|
|
|
|
8. What part does the object program play in the compilation and execution processes? (p. 12) |
|
|
|
|
|
|
|
|
9. Name the four basic ways of structuring statements in C++ and other languages. (p.15) |
|
|
|
|
|
|
|
|
10. What are the six basic components of a computer? (p. 16) |
|
|
|
|
|
|
|
|
11. What is the difference between hardware and software? (p. 19) |
|
|
|
|
|
|
|
|
12. What is the divide-and-conquer approach? (p. 29) |
|
|
|
|
|
|
|
|
Answers 1. A computer program is a sequence of instructions performed by a computer. 2. The three phases of a program's life cycle are problem solving, implementation, and maintenance. 3. No. All programs are algorithms, but not all algorithms are programs. 4. A set of rules, symbols, and special words used to construct a program. 5. True. The written text and comments make a program easier for others to understand, use, modify, and maintain. 6. A high-level programming language is easier to use than an assembly language or a machine language. And programs written in a high-level language can be run on many different computers. |
|
|
|
|
|
|
|
|
7. The compiler translates a program written in a high-level language into machine language. |
|
|
|
|
|
|
|
|
8. The object program is the machine language version of a program. It is created by a compiler. The object program is what is loaded into the computer's memory and executed. 9. Sequence, selection, loop, and subprogram. 10. The basic components of a computer are the memory unit, arithmetic/logic unit, control unit, input and output devices, and auxiliary storage devices. 11. Hardware is the physical components of the computer; software is the collection of programs that run on the computer. 12. The divide-and-conquer approach is a problem-solving technique that breaks a large problem into smaller, simpler subproblems. |
|
|
|
|
|