Chapter 2 Flashcards

1
Q

A “data type” is a classification that describes 3 things about an item. What are those things?

A
  1. What values can be assigned to it
  2. How the item is stored.
  3. What operations can be performed on that item.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

This word describes data that consists of numbers and can have arithmetic operations performed on it.

A

Numeric

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

What is a non-numeric data type called?

A

a “string”

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

What is the difference between integers and floating-point numbers?

A

Integers are whole numbers, while floating-point numbers make use of decimal points/places.

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

What is another word for floating-point numbers?

A

Real numbers

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

A numeric constant is a specific numeric value. Therefore, it is…

A

Literal.

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

A specific group of characters enclosed within quotation marks.

A

Literal string constant

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

A literal numeric or string constant is called

A

an unnamed constant

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

A feature of some programming languages that prevent assigning values of an incorrect data type

A

Type-safety

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

What would you call programming languages that prevent the assignment of an incorrect value to a data type?

A

Strongly-typed

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

The name of a program component

A

Identifier

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

the limited word set that is reserved in a programming language

A

keywords

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

What are, objectively, the ugliest naming conventions?

A

Hungarian notation and Kebob notation

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

What symbol is the assignment operator?

A

Equal sign.

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

A value used by an operator

A

Operand.

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

An operator that requires 2 operands - one on each side of it.

A

Binary operator.

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

This makes it so that a value on the right of a binary operator is saved to a memory address defined on the left of that same binary operator

A

Assignment statement.

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

In an assignment statement, what can go on the right?

A

A variable or constant

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

A more specific word for the operand on the left side of an operator that holds the memory address identifier

A

L-value

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

An unknown value stored in an unassigned variable

A

Garbage

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

Assigning a variable’s first value at the same time that said variable is declared is called:

A

Initializing the variable.

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

What makes a named constant, or “magic number” different from other variables?

A

Its value cannot change after its first assignment.

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

Dictate the order in which operations within the same statement are carried out

A

Rules of Precedence

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

Arithmetic operations use ________, while variable assignments use _________

A

left-to-right associativity, right-to-left associativity

25
Q

Small units that, combined together, create the whole of the program

26
Q

What are 4 synonyms for “modules”?

A
  1. Subroutines
  2. Functions
  3. Procedures
  4. Methods
27
Q

Using a module’s name to invoke it, which simultaneously executes it.

A

“Calling a module”

28
Q

The act of reducing a large program into more small-sized, manageable modules.

A

Functional decomposition.

29
Q

The process of paying attention to important properties, while ignoring nonessential details.

A

Abstraction.

30
Q

A feature of modular programs that allowed modules within the program to be applied in other programs.

A

Reusability.

31
Q

The greater program that calls upon other, smaller modules.

A

The mainline logic.

32
Q

This marks the end of the module and identifies the point at which control returns to the mainline logic or the module that called upon it.

A

The module’s return statement.

33
Q

The act of containing a task’s instructions inside of a module

A

Encapsulation.

34
Q

A memory location wherein the computer keeps track of the correct memory address to which it should return after executing a module.

35
Q

Measures the degree to which all of a module’s statements contribute to the same task.

A

Functional cohesion.

36
Q

Data items that are recognizable to a module

37
Q

What is visible data also called?

A

“In scope”

38
Q

Variables that are declared only within the module that uses them.

A

“Local”

39
Q

A _______ module is one that has a high level of reusability.

40
Q

Variables that are known to an entire program (mainline logic as well as all encapsulated modules) are called _________

A

Global variables.

41
Q

Steps that are performed at the beginning of a program to prepare the program to run efficiently.

A

Housekeeping tasks.

42
Q

Steps of a program that are repeated for each set of input data.

A

Detail loop tasks.

43
Q

The steps you take at the end of a program to finish the application/return to the program’s mainline logic.

A

End-of-job tasks.

44
Q

Written explanations that are not a part of the program’s logic, but that serve as documentation for those reading the program.

A

Program comments.

45
Q

Internal documentation

A

Documentation within a coded program.

46
Q

Programs that contain meaningful identifiers which describe their purpose

A

Self-documenting programs

47
Q

A list of every variable name used in a program, including their type, size, and description.

A

Data dictionary.

48
Q

Temporary variables are also called ______.

A

work variables.

49
Q

the act of repeating input back to the user in either a subsequent prompt or in output

A

Echoing input.

50
Q

A message displayed on a monitor that asks the user for a response (and sometimes describes how that response should be given)

51
Q

A declaration is a statement that provides these things for a variable:

A
  1. A data type.
  2. An identifier
  3. (Optionally) an initial value.
52
Q

Two separate data types:

A
  1. numeric.

2. string.

53
Q

Identifiers should always be the 3 following:

A
  1. One word
  2. Begin with a letter
  3. Appropriate/meaningful
54
Q

The rules of precedence can be overwritten with ________.

A

Parentheses

55
Q

The number of chained calls among modules is only limited by…

A

the amount of memory available on the computer.

56
Q

A rectangle with a bar across the top is the symbol for _______.

57
Q

These can be used for long arithmetic processes and to hold intermediate results during a program’s execution

A

Temporary variables.

58
Q

What is the input statement called that precedes a loop?

A

Priming input