Chapter 2 Flashcards

1
Q

algorithm

A

Statements that describe how a problem is solved in terms of the actions to be executed, and specify the order in which these actions should be executed. Algorithms can help the programmer plan a program before writing it in a programming language.

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

assignment operator

A

(=) Assigns a value to a variable

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

Assignment statement

A

A simple statement that assigns a value to a variable using an assignment operator (=). When a value is assigned to a variable, it replaces the previous value of the variable, which is destroyed.

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

Byte type

A

A primitive data type that represents an integer in a byte. The range of a byte value is from 2^7(-128) to (2^7)-1 (127)

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

Casting

A

The process of converting a primitive data type value into another primitive type.

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

Data type

A

Used to declare variables to indicate what kind of value the variable can hold.

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

declare variables

A

Declares a variable with a data type.

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

decrement operator

A

(–)

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

double type

A

A primitive data type that represents double precision floating-point numbers with 14 to 15 significant digits of accuracy.

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

expression

A

Represents a computation involving values, variables, and operators, which evaluates to a value.

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

final keyword

A

A modifier that specifies a constant.

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

float type

A

A primitive data type that represents single precision floating-point numbers with 6 to 7 significant digits of accuracy. The double type is used to represent double precisions with 14 to 15 significant digits of accuracy.

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

floating-point number

A

A number that includes a fractional part.

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

identifier

A

A name of a variable, method, class, interface, or package.

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

Increment Operator

A

(++)

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

incremental coding and testing

A

A programming methodology that develops and tests programs incrementally. This approach is efficient and productive. It helps eliminate and isolate errors.

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

int type

A

A primitive data type that represents an integer in the range from -2^31 (-2147483648) to (2^31)-1 (2147483647

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

IPO

A

Stands for Input, Process, Output

19
Q

literal

A

A constant value that appears directly in the program. A literal may be numeric, character, boolean, or null for object type.

20
Q

long type

A

A primitive data type to represent an integer in the range from -2^63 to (2^63)-1

21
Q

narrowing a type

A

Casting a variable of a type with a larger range to a variable of a type with a smaller range.

22
Q

operand

A

Are the values operated by an operator.

23
Q

operator

A

Operations for primitive data type values. Examples of operators are +, -, /, and %.

24
Q

overflow

A

When a variable is assigned a value that is too large (in size) to be stored, it causes overflow.

25
Q

postdecrement

A

Refers to the syntax such as x– where the – operator is placed after a variable.

26
Q

postincrement

A

Refers to the syntax such as x++ where the ++ operator is placed after a variable.

27
Q

predecrement

A

Refers to the syntax such as –x where the – operator is placed before a variable.

28
Q

preincrement

A

Refers to the syntax such as ++x where the ++ operator is placed before a variable.

29
Q

primitive data type

A

The primitive data types are byte, short, int, long, float, double, boolean, and char.

30
Q

pseudocode

A

Describes the program logic using natural language mixed with some programming code.

31
Q

requirements specification

A

Is a formal process that seeks to understand the problem that the software will address and to document in detail what the software system needs to do.

32
Q

scope of a variable

A

Is the part of the program where the variable can be referenced.

33
Q

short type

A

A primitive data type that represents an integer in the range from -2^15 (-32768) to (2^15)-1 (32767)

34
Q

specific import

A

Specifies a single class in the import statement. For example, import java.util.Scanner imports Scanner from package java.util.

35
Q

system analysis

A

Seeks to analyze the data flow and to identify the systems input and output. When you do analysis, it helps to identify what the output is first, and then to figure out what input data you need in order to produce the output.

36
Q

system design

A

Is to design a process for obtaining the output from the input. This phase involves the use of many levels of abstraction to break down the problem into manageable components and design strategies for implementing each component.

37
Q

underflow

A

When a floating-point number is too small (i.e. too close to zero) to be stored, it causes underflow. Java approximates it to zero, so normally you don’t need to be concerned about underflow.

38
Q

UNIX epoch

A

January 1, 1970 GMT is known as the UNIX epoch because 1970 was the UNIX operating system was introduced.

39
Q

variable

A

Variables are used to store data and computational results in the program.

40
Q

widening a type

A

Casting a variable of a type with a smaller range to a variable of a type with a larger range.

41
Q

Wildcard import

A

Imports all the classes in a package. For example, import.java.util* imports all classes from package java.util.

42
Q

Named constant

A

A variable declared final in Java. A local constant is a constant declared in side a method.

43
Q

Final

A

A modifier that specifies a constant.