Sie sind auf Seite 1von 4

Rogel, Elmerson Joshua

COE112/A3
Assignment 2
1.
What does a declaration provide for a variable? both of the above
2.
A variables data type describes all of the following except. the scope of the
variable
3.

The value stored in an uninitialized variable is. -garbage

4.

The value 3 is a. -numeric constant

5.

The assignment operator. is a binary operator

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.

Every module has all of the following except. local variables

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.

Program comments are none of the above

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.
20.

A message that asks a user for input is a. prompt

Rogel, Elmerson Joshua


COE112/A3
Assignment 2
#1 Design the output and draw a flowchart or write pseudocode for a program that
calculates the grown size that students need for a graduation ceremony.

#2
Draw a typical hierarchy chart for a pay check producing program.

Rogel, Elmerson Joshua


COE112/A3
Assignment 2
#3
Design the output and draw a flowchart or write pseudocode for a program that
calculates the service charge a customer owes for writing a bad check.

Rogel, Elmerson Joshua


COE112/A3
Assignment 2
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.
12. Which is true of stacking structures? -Each structure has only one point
where it can be stacked on top of another.
13. When you input data in a loop within a program, the input statement that
precedes the loop _____. is called a priming input
14. A group of statements that executed as a unit is a _____. block
15. Which of the following is acceptable in a structured program? All of these
are acceptable.
16. In a selection structure, the structure-controlling question is ____. asked
once at the beginning of the structure.
17. In a loop, the structure-controlling question is _____. Asked before and
after the loop body executes.
18. Which of the following is not a reason for enforcing structure rules in
computer programs? Structured programs usually are shorter than
unstructured ones.
19. Which of the following is not a benefit of modularizing programs? If you use
modules, you can ignore the rules of structure.
20. Which of the following is true of structured logic? Any task can be
describe using some combination of the three structures.

Das könnte Ihnen auch gefallen