Topic 3 Flashcards

1
Q

a logically snarled program statement

A

Spaghetti Code

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

This can be a result of poor program
design

A

Spaghetti code

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

Programs that use spaghetti code logic
are known to be ____________ __________ :
they do not follow rules of structured
logic

A

unstructured programs

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

The issue with spaghetti code is not that it doesn’t work , it is the program ________ and _____________.

A

readability, maintainability

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

: a basic unit of programming logic

A

structure

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

Any program can be constructed from only
three basic types of structures

A

Sequence
Selection
Loop

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

___________structure directs the
computer to process program
instructions one after another in the
order listed in the program

A

sequence

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

_________ structure, you ask a question and,
depending on the answer, you take one of two courses of action
*Also known as decision structure or an if then else

A

selection

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

Selection structure also termed as if-the-else or ____ ________ ____

A

dual-alternative ifs/selection

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

____ structure, you continue to repeat actions
while a condition remains true
* Also called repetition or iteration

A

loop

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

Programmers call this a
while … do (or simply while
loop ), as it fits the following

A

Loop structure

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

What are the three structures?

A

Stacking
Nesting
Block

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

_______: attaching structures end to
end

A

Stacking

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

End structure statements (in
pseudocode)

A

Stacking

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

________ is the placing of one structure within another
*Indent the nested structure’s statements (for readability)

A

Nesting

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

_____: a group of
statements that execute as
a single unit

A

Block

17
Q
  • reads the first input data record outside the loop where the rest of
    the input is read
    *Helps keep the program structured
A

Priming Read (or priming input)

18
Q

By writing a structured program, your solution provides:

A

Clarity
Professionalism
Efficiency
Maintenance
Modularity

19
Q

Structured program is also called ?

A

go-to-less programming

20
Q

Do not follow the rules of structured logic

A

Unstructured Programs