Chapter 9 Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

TF

Computers can generate truly random numbers

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

TF

The python random function returns a pseudo random int

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

TF

Top-down design is also called stepwise refinement

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

TF

In top-down design, the main algorithm is written in terms of functions that don’t yet exist

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

TF

The main function is at the top of a functional structure chart

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

TF

A top-down design is best implemented from the top down

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

TF

Unit-testing is the process of trying out a component of a larger program in isolation

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

TF

A developer should use either top-down design or spiral design, but not both

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Reading design books alone will make you a great designer

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

TF

A simplified version of a program is called a simulation

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which expression is true approx 66% of the time?
A) random () >=66 B) random() <0.66
C) random()<66 D) random()>=0.66

A

D) random( ) >= 0.66

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which of the following is not a step in pure top-down design?
A) Repeat the process on smaller problems
B) Detail the algorithm in terms of its interfaces with smaller problems.
C) Construct a simplified prototype of the system.
D) Express the algorithm in terms of smaller problems.

A

A) Repeat the process on smaller problems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A graphical view of the dependencies among components of a design is called a
A) flow chart B) prototype
C) interface D) structure chart

A

D) structure chart

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The arrows in a module hierarchy chart depict
A) information flow B) control flow
C) sticky-note attachments D) one-way streets

A

A) information flow

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In top-down design, the subcomponents of the design are
A) objects B) loops
C) functions D) programs

A

C) functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

A simulation that uses probabilistic events is called
A) Monte Carlo B) pseudo random
C) Monty Python D) chaotic

A

A) Monte Carlo

17
Q

The initial version of a system used in spiral development is called a
A) starter kit B) prototype
C) mock-up D) beta-version

A

B) prototype

18
Q

In the racquetball simulation, what data type is returned by the gameOver function?
A) bool B) int
C) string D) float

A

A) bool

19
Q

How is a percent sign indicated in a string formatting template?
a) % B) /%
C) %% D) /%%

A

a) %

20
Q

The easiest place in a system structure to start unit-testing
is
A) the top B) the bottom
C) the middle D) the main funtion

A

B) the bottom