Java Programming - Chapter 6 - Looping

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/35

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

36 Terms

1
New cards

Loop

A structure that allows repeated execution of a block of statements.

2
New cards

Loop body

The block of statements that executes when the Boolean expression that controls the loop is true.

3
New cards

Iteration

One loop execution.

4
New cards

While loop

Executes a body of statements continually as long as the Boolean expression that controls entry into the loop continues to be true.

5
New cards

Definite loop

A loop that executes a specific number of times is a definite loop or a counted loop.

6
New cards

Indefinite loop

A loop in which the final number of loops is unknown.

7
New cards

Loop control variable

A variable whose value determines whether loop execution continues.

8
New cards

Infinite loop

A loop that never ends.

9
New cards

Empty body

A block with no statements in it.

10
New cards

Counter-controlled loop

A definite loop.

11
New cards

Incrementing

Incrementing a variable adds 1 to its value.

12
New cards

Decrementing

Decrementing a variable reduces its value by 1.

13
New cards

Event-controlled loop

An indefinite loop is an event-controlled loop.

14
New cards

Validating data

The process of ensuring that a value falls within a specified range.

15
New cards

Priming read or priming input

The first input statement prior to a loop that will execute subsequent input statements for the same variable.

16
New cards

Counting

The process of continually incrementing a variable to keep track of the number of occurrences of some event.

17
New cards

Accumulating

The process of repeatedly increasing a value by some amount to produce a total.

18
New cards

add and assign operator ( += )

Alters the value of the operand on the left by adding the operand on the right to it.

19
New cards

subtract and assign operator ( -= )

Alters the value of the operand on the left by subtracting the operand on the right from it.

20
New cards

multiply and assign operator ( *= )

Alters the value of the operand on the left by multiplying the operand on the right by it.

21
New cards

divide and assign operator ( /= )

Alters the value of the operand on the left by dividing the operand on the right into it.

22
New cards

remainder and assign operator ( %= )

Alters the value of the operand on the left by assigning the remainder when the left operand is divided by the right operand.

23
New cards

prefix ++ (prefix increment operator)

Adds 1 to a variable, then evaluates it.

24
New cards

postfix ++ (postfix increment operator)

Evaluates a variable, then adds 1 to it.

25
New cards

prefix and postfix decrement operators

subtract 1 from a variable.

26
New cards

for loop

A special loop that can be used when a definite number of loop iterations is required.

27
New cards

pretest loop

One in which the loop control variable is tested before the loop body executes.

28
New cards

do..while loop

Executes a loop body at least one time; it checks the loop control variable at the bottom of the loop after one repetition has occurred.

29
New cards

posttest loop

One in which the loop control variable is tested after the loop body executes.

30
New cards

inner loop

Contained entirely within another loop.

31
New cards

outer loop

Contains another loop.

32
New cards

do-nothing loop

One that performs no actions other than looping.

33
New cards

Loop fusion

The technique of combining two loops into one.

34
New cards

Counted Loop

A definite loop

35
New cards

Nested Loops

When one loop is contained within another.

36
New cards

Sentinel

A value that stops a loop