Module 4

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

1/17

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.

18 Terms

1
New cards

repetition control structures

These are Java statements that allows us to execute specific blocks of code a number of times.

2
New cards

Loop Body

Within a looping strucure, a Boolean expression is evaluated. If it is true, a block of statements called the _____ executes and the Boolean expression is evaluated again.

3
New cards

iteration

One execution of any loop is called an _____.

4
New cards

initialization, loop test, loop body, loop update

What are the four loop sections?

5
New cards

initialization

This step occurs prior to the loop. Variables that need to be initialized are given values prior to the first time the loop test is evaluated.

6
New cards

loop test

This statement determines whether the loop body will be executed. When this section is false, the loop body is not executed. If this statement is always true, an infinite loop results, unless the loop is exited with a break or return statement.

7
New cards

loop body

The statements that are executed each time the loop test evaluates to true.

8
New cards

loop update

The statements that affect values in the loop test. These statements ensure that the loop will eventually terminate. Values of variables in the loop test will be changed by the update statements.

9
New cards

while, do while, for loop

What are the three types of repetition control structures?

10
New cards

while loop

The statement or block of statements that is repeated as long as some condition is satisfied.

11
New cards

do while loop

This loop is similar to the while-loop. The statements inside this loop are executed several times as long as the condition is satisfied.

12
New cards

for loop

It is an entry-controlled loop that allows a user to execute a block of a statement(s) repeatedly with a known number of times on the basis of a specified condition.

13
New cards

initialization

for(initialization; test_condition; StepExpression){}

in this syntax, which statement tell where the loop start?

14
New cards

test_condition

for(initialization; test_condition; StepExpression){}

in this syntax, which statement tell where the loop ends?

15
New cards

StepExpression

for(initialization; test_condition; StepExpression){}

in this syntax, which statement you can increment or decrement the loop?

16
New cards

continue statement

This is mostly used inside loops. Whenever it is encountered inside a loop, control directly jumps to the beginning of the loop for next iteration, skipping the execution of statements inside loop’s body for the current iteration.

17
New cards

break statement

It is used to come out of the loop instantly. Whenever this statement is encountered inside a loop, the control directly comes out of loop and the loop gets terminated for rest of the iterations.

18
New cards

loop

It is a structure that allows repeated execution of a block of statements.