Beruflich Dokumente
Kultur Dokumente
COE112/A3
Assignment 2
PAGES 118-121
1.
2.
A variables data type describes all of the following except. the scope of the
variable
3.
4.
5.
6.
Which of the following is true about arithmetic precedence? Division has
higher precedence than subtraction.
7.
Which of the following is a term used for module in any programming
language? both of these
8.
Which of the following is a reason to use modularization? Modularization
allows you to more easily reuse your work.
9.
What is the name for the process of paying attention to important properties
while ignoring nonessential details? abstraction
10.
11.
Programmers say that one module can_____ another, meaning that the first
module causes the second module to execute call
12.
The more that a modules statements contribute to the same job, the greater
the ____ of the module. functional cohesion
13.
In the most modern programming languages, when a variable or constant is
declared in a module, the variable constant is _____ in that module. in scope
14.
Which of the following is not typical housekeeping task? printing
summaries
15.
Which module in a typical program will execute the most times? the detail
loop
16.
A hierarchy chart tells you. which routines call which other routines
17.
What are no executing statements that programmers place within their code
to explain program statement in English? comments
18.
19.
Which of the following is valid advice for naming variables? To make names
easier to read, separate long words by using underscores or capitalization
for each new words.
NO
Multiply = H (2.54
Centimeters)
W (453.59 Grams)
Print Multiplication
STOP
Pseudocode:
#2
Draw a typical hierarchy chart for a pay check producing program.
#3
Pages 151-154
1. Snarled program logic is called _____ code. spaghetti
2. The three structures of structured programming are _____. sequence,
selection, and loop
3. A sequence structure can contain _____. only one task
4. Which of the following is not another term for a selection structure? loop
structure
5. The structure in which you ask a question, and, depending on the answer,
take some action and then ask the question again, can be called all of the
following except _____. D. if-then-else
6. Placing a structure within another structure is called _____ the structures.
nesting
7. Attaching structures end to end is called _____. stacking
8. The statement if age >= 65 then senior Discount= yes is an example of a
____. single-alternative selection
9. The statement while temperature remains below 60, leave the furnace on is
an example of a_____. loop
10. The statement while temperature remains below 60, leave the furnace on is
an example of a_____. dual-alternative selection
11. Which of the following attributes do all three basic structures share? -B.
They all have one entry and one exit point.