Flowchart (EXAM #2) Flashcards

1
Q

When do we use flowcharting?

A

Any process we want to understand better:

  • Software development
  • Business process modeling
  • Decision process modeling
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Symbols: oval

A

The Start and End symbol begins and ends the process

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

Symbols: parallelogram

A

The Input/Output (a.k.a. “data”) symbol is used to represent inputs from the user or outputs to the user

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

Symbols: rectangle

A

The Process symbol is used to represent any type of function or action. This symbol may be used to represent one step or a sequence of steps.

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

Symbols: arrow

A

The Flow symbol represents movement to the next operation

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

Symbols: diamond

A

The Decision symbol is a junction where a decision must be made. A decision must return true or false

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

Symbols: circle

A

The Connector symbol is used when more than one flow arrow head needs to come together.

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

Flowchart

A

efficient way to express algorithms in a succinct and precise manner

  • valuable when conceptualizing a process, analyzing requirements, and training workers and users
  • used by both technical and nontechnical people (commonly used by managers, engineers, and software developers)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

variable name conventions

A

use short variable name, should not be separated by spaces cause computer programs think of variables as a single entity & will interpret a space as the end of the variable name

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

variable legends

A

include legend to show short variables & their associated meaning so the reader can understand what the short name means

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

Flow Control Patterns

A
  • sequence
  • selection
  • repetition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Sequence Pattern

A

one step is completed followed by a next step & so on

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

Selection Pattern

A

the answer to a question causes a branch in the process, thus some steps are skipped under certain circumstances. As we define a decisions, it will return either true or false.

-have selection decision structures:
+if then else
+if then null else
+nested selection

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

Repetition (looping, iteration)

A

allows 1+ actions to be repeated until a condition is met, a step or set of steps is repeated until a certain condition is met

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

Why Gotos are prohibited?

A

In the early days of programming, programmers often used a programming flow control feature called a goto that would allow a program to jump from one location to another location. For example, a program may jump from near the beginning to near the end and then to the middle. Programs jumped all over the place. This practice made it difficult to maintain and update programs because it was almost impossible to follow the logic of a program from start to finish in a linear fashion.

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

selection decision structures:

A

+if then else
+if then null else
+nested selection

17
Q

if-then-else

A

-does one thing if the decision returns true and does a different thing if the decision returns false
(4 parts: diamond (logical test), true branch (do-if-true), false branch(do if false), and end (represented by the connection circle.)

18
Q

if-then-null-else

A
  • an ELSE action is not required for every If-Then statement. If the ELSE condition is omitted, the If-Then-Null-Else is used instead
  • if the logical test is true, then the do-if-true action should be taken otherwise no action is taken
  • Ex: if a sales person exceeds sales goals, calculate a bonus if not then do not calculate
19
Q

Nested IF-Then-Else

A

-depending on how the first decision is answered, the flow can go to additional decisions
(if decision 1 is true, then path 1 is executed and the selection process finishes, otherwise decision 2 is test and if it returns true then path 2 is executed and the selection finishes. If decision 2 is false, decision 3 is tested and etc.)(IF all previous decisions are false, then Case Else path is executed)

20
Q

Repetition (Loop) Structures

A

-a step or set of steps is repeated until a certain condition is met, the repeating code is referred to as a loop or iteration
EX: while loop

21
Q

while loop

A

-tests a condition first, if the test returns false, then a process is executed, then the flow loops back to the decision again, each time the test returns false then a process is executed.
if the test returns true, the algorithm exits the loop (can be thought of as a repeating if-then-else statement)

22
Q

Input

A
  • inputs can come from two sources: from users or the data stored in a setup section. Values stored in a setup storage can reduce the need to re-input values each time the program is run.
  • When regular inputs(input obtained from the user each time the algorithm is executed. Includes beginning of algorithm inputs and process control inputs) are required, the word INPUT should be used )
  • when input from setup is required, use INPUT-FROM-SETUP (input from data stored for frequent use. These vales are not changed each time the program is run)
23
Q

Outputs

A

Three types of outputs exist for flowcharts:
-Display (used when output is sent to the computer screen, the unchanged inputs in an output symbol are surrounded by parentheses to differentiate them from the other outputs)
-Print (used when output is sent to a printer)
Prompt (used when it is necessary to ask the user for some specific input after the program has begun, the prose of the prompt should be in quotation marks. followed by an input, and then a decision structure)

24
Q

Flowcharting process

A
  1. start
  2. input data
  3. perform the algorithm (logic and calculations)
  4. output the results
  5. end
25
Q

order of operations

A
  1. everything with parentheses
  2. inner parentheses take precedence over outer parentheses
  3. The power (^) operator takes precedence over multiply (*) & divide (/).
  4. Multiply (*) & divide (/) take precedence over addition (+) and subtraction (-)