1: Chapter 1 & 2 Flashcards

1
Q

Algorithm

A

A step-by-step description of how to accomplish a task.

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

Program

A

A list of instructions to be carried out by a computer.

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

Binary number

A

A number composed of just 0s and 1s, also known as a base-2 number.

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

Digital

A

Based on numbers that increase in discrete increments, such as the integers 0, 1, 2, 3, etc.

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

Program execution

A

The act of carrying out the instructions contained in a program.

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

Compiler

A

A program that translates a computer program written in one language into an equivalent program in another language (often, but not always, translating from a high-level language into machine language).

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

Java Virtual Machine

A

A theoretical computer whose machine language is the set of Java bytecodes.

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

Java Runtime

A

A program that executes compiled Java bytecodes.

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

Java Class Libraries

A

The collection of preexisting Java code that provides solutions to common programming problems.

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

Console window

A

A special text-only window in which Java programs interact with the user.

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

Class

A

A unit of code that is the basic building block of Java programs.

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

Method

A

A program unit that represents a particular action or computation.

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

Statement

A

An executable snippet of code that represents a complete command.

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

Identifier

A

A name given to an entity in a program, such as a class or method.

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

Comment

A

Text that programmers include in a program to explain their code. The compiler ignores comments.

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

Decomposition

A

A separation into discernible parts, each of which is simpler than the whole.

17
Q

Iterative enhancement

A

The process of producing a program in stages, adding new functionality at each stage. A key feature of each iterative step is that you can test it to make sure that piece works before moving on.

18
Q

Static method

A

A block of Java statements that is given a name.

19
Q

Method call

A

A command to execute another method, which causes all of the statements inside that method to be executed.

20
Q

Flow of control

A

The order in which the statements of a Java program are executed.

21
Q

Data type

A

A name for a category of data values that are all related, as in type int in Java, which is used to represent integer values.

22
Q

Expression

A

A simple value or a set of operations that produces a value.

23
Q

Evaluation

A

The process of obtaining the value of an expression.

24
Q

Operator

A

A special symbol (like + or *) that is used to indicate an operation to be performed on one or more values.

25
Q

Precedence

A

The binding power of an operator, which determines how to group parts of an expression.

26
Q

Variable

A

A memory location with a name and a type that stores a value.

27
Q

Declaration

A

A request to set aside a new variable with a given name and type.

28
Q

String concatenation

A

Combining several strings into a single string, or combining a string with other data into a new, longer string.

29
Q

Control structure

A

A syntactic structure that controls other statements.

30
Q

Scope

A

The part of a program in which a particular declaration is valid.

31
Q

Local variable

A

A variable declared inside a method that is accessible only in that method.

32
Q

Localizing variables

A

Declaring variables in the innermost (most local) scope possible.

33
Q

Infinite loop

A

A loop that never terminates.

34
Q

Pseudocode

A

English-like descriptions of algorithms. Programming with pseudocode involves successively refining an informal description until it is easily translated into Java.

35
Q

Class constant

A

A named value that cannot be changed. A class constant can be accessed anywhere in the class (i.e. its scope is the entire class).

36
Q

Widening

A

The process of changing a value’s data type from a narrower one to a wider one. Widening is a “safe” conversion because there is no potential loss of information.

37
Q

Narrowing

A

A programmer may force narrowing to occur by using an explicit type cast in an expression. Type casts have higher precedence than all arithmetic operations.

38
Q

Overloaded operator

A

The plus sign (+) is said to be an overloaded operator because it performs different operations on different types of data (concatenation if operands are of type string and addition if operands are numeric types). The division operator is also overloaded (ints vs. doubles).

39
Q

Describe the flow of the Java Virtual Machine.

A

Your source code (.java file) is compiled by the Java compiler into Java bytecodes (.class file), which is then interpreted by the Java Virtual Machine so that it can run on Mac, Windows, Unix, etc.

Source code (.java file) –> compiled by Java compiler –> Java bytecodes (.class file) –> JVM (interpreter) –> Mac, Windows, Linux