Chapter 2 Problem Specification Indicates That

subject Type Homework Help
subject Pages 6
subject Words 1086
subject Authors Diane Zak

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Chapter 2: First You Need to Plan the Party (Problem-Solving Process)
TRUE/FALSE
1. The first step that programmers follow when they solve problems is to plan the algorithm.
2. The final step that programmers follow when they solve problems is to rigorously test the program
using the computer.
3. The two most important components of any problem are the problem’s output and its input.
4. When analyzing a problem, you always search first for the input, and then for the output.
5. The input typically is stated as nouns and adjectives in the problem specification.
6. When determining the output, it helps to think about the information that you would need to solve the
problem manually.
7. Analyzing real-world problems is generally as easy as analyzing the problems found in a textbook.
8. If you are having trouble analyzing a problem, try reading the problem specification several times, as it
is easy to miss information during the first reading.
9. Each instruction in the algorithm should start with a noun since it will describe an action that the
computer needs to take.
10. Most algorithms begin with an instruction that enters the input items into the computer.
11. Most algorithms end with an instruction to print, display, or store the output items.
page-pf2
12. Display, print, and store refer to a file on disk, the printer, and the computer screen, respectively.
13. To avoid confusion, it is important that the algorithm is consistent when referring to the input and
output items.
14. Pseudocode is standardized.
15. Unlike a flowchart, pseudocode uses standardized symbols to visually depict an algorithm.
16. You can draw the flowchart symbols by hand; or, you can use the drawing or shapes feature in a word
processor.
17. Visio is a flowcharting program.
18. When planning an algorithm, you need to create both a flowchart and pseudocode.
19. For simple algorithms, flowcharts work just fine.
20. Not all algorithms require a processing item.
21. Desk-checking is also called pencil-tracing, because the programmer uses a pencil and paper to follow
each of the algorithm’s instructions.
22. Before you begin the desk-check, you first choose a set of sample data for the input values, which you
then use to manually compute the expected output values.
23. It is helpful to use a desk-check table when desk-checking an algorithm.
24. You can only perform a desk-check using an algorithm’s pseudocode.
page-pf3
25. You should test an algorithm with invalid data because users sometimes make mistakes when entering
data.
MULTIPLE CHOICE
1. The ____ is the goal of solving the problem.
a.
yield
c.
contribution
b.
output
d.
input
2. The ____ is the item or items needed to achieve the goal.
a.
yield
c.
contribution
b.
output
d.
input
3. A helpful way to identify the ____ is to search the problem specification for what the user wants to see
printed on paper, displayed on the screen, or stored in a file.
a.
output
c.
yield
b.
contribution
d.
input
4. What the user wants to see printed on paper, displayed on the screen, or stored in a file is typically
stated as ____ and adjectives in the problem specification.
a.
adverbs
c.
nouns
b.
commands
d.
verbs
5. If a problem specification indicates that the program’s user wants to see the amount of her annual
commission displayed on the screen, the ____ is the annual commission.
a.
yield
c.
symbol
b.
output
d.
input
6. A helpful way to identify the ____ is to search the problem specification for what information the
computer will need to know to print, display, or store the output items.
a.
output
c.
yield
b.
symbols
d.
input
7. Suppose that a user wants to see his new weekly pay displayed on the screen. In this context, the words
new and weekly are ____.
a.
adjectives
c.
nouns
b.
verbs
d.
adverbs
page-pf4
8. The ____ step is the most difficult of the problem-solving steps, and it requires a lot of time, patience,
and effort.
a.
planning
c.
analysis
b.
desk-check
d.
testing
9. The second step in the problem-solving process is to plan the ____, which is the set of instructions
that, when followed, will transform the problem’s input into its output.
a.
program
c.
instructions
b.
algorithm
d.
statements
10. An algorithm should state both what is to be calculated and ____ to calculate it.
a.
where
c.
how
b.
when
d.
who
11. ____ is called false code because, although it resembles programming language instructions, it cannot
be understood by a computer.
a.
Binary code
c.
Planning code
b.
Flow code
d.
Pseudocode
12. Programmers use ____ to help them while they are planning an algorithm.
a.
pseudocode
c.
templates
b.
sheets
d.
charts
13. Besides using pseudocode, programmers also use ____ when planning algorithms.
a.
pseudocharts
c.
flowcharts
b.
templates
d.
coding sheets
14. The ____ contains three different symbols: an oval, a parallelogram, and a rectangle.
a.
pseudocode
c.
desk-check table
b.
flowchart
d.
specification
15. Symbols in a flowchart are connected with lines, called ____.
a.
chartlines
c.
pointers
b.
flowlines
d.
connectors
16. The oval symbol in a flowchart is called the ____ symbol.
a.
start/stop
c.
process
b.
input/output
d.
flow
page-pf5
17. The parallelogram symbol in a flowchart is called a(n) ____ symbol.
a.
start/stop
c.
process
b.
input/output
d.
flow
18. The rectangle in a flowchart is called the ____ symbol and is used to represent tasks such as
calculations.
a.
start/stop
c.
process
b.
input/output
d.
flow
19. When an algorithm becomes more complex, the program’s logic may be easier to see in ____.
a.
code
c.
pseudocode
b.
a processor
d.
a flowchart
20. Programmers use the pseudocode as a guide when coding the algorithm, which is the ____ step in the
problem-solving process.
a.
second
c.
fourth
b.
third
d.
fifth
21. A ____ item represents an intermediate value that the algorithm uses when processing the input into
the output.
a.
calculating
c.
processing
b.
data
d.
storage
22. The term ____ refers to the fact that the programmer reviews the algorithm while seated at his or her
desk rather than in front of the computer.
a.
desk-checking
c.
desk-tracing
b.
program-checking
d.
hand-checking
23. You ____ an algorithm to verify that it is not missing any steps, and that the existing steps are correct
and in the proper order.
a.
desk-trace
c.
program-check
b.
desk-check
d.
hand-check
24. ____ data is data that the algorithm is expecting the user to enter.
a.
Invalid
c.
Unchecked
b.
Checked
d.
Valid
25. ____ data is data that the algorithm is not expecting the user to enter.
a.
Invalid
c.
Unchecked
page-pf6
b.
Checked
d.
Valid

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.