Exam 4: Introduction to Control Statements

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Identify the letter of the choice that best matches the phrase or definition. a.Random b.Update c.Abs d.Exception e.Break -A method in the Math class.

(Essay)
4.9/5
(38)

In a(n) ____-controlled loop, the continuation condition is tested at the top of the loop on each pass.

(Multiple Choice)
4.8/5
(30)

A typical loop has four component parts, including all of the following EXCEPT ___ statements.

(Multiple Choice)
4.8/5
(35)

Identify the letter of the choice that best matches the phrase or definition. a.Random b.Update c.Abs d.Exception e.Break -What happens when a program encounters an operation that it cannot perform at runtime.

(Essay)
4.8/5
(40)

Some programmers prefer to use for loops instead of while loops because the loop control variable can be declared in its header. ____________________

(True/False)
4.7/5
(34)

It is better to underuse braces or parentheses than to overuse them.

(True/False)
4.9/5
(39)

For a loop to terminate, each pass must move the variables in the condition significantly closer to satisfying the condition.

(True/False)
4.8/5
(32)

Identify the letter of the choice that best matches the phrase or definition. a.Random b.Update c.Abs d.Exception e.Break -A class used to simulate stock market fluctuations.

(Essay)
4.9/5
(28)

Use a(n) ____ statement rather than two if statements when the alternative courses of action are mutually exclusive.

(Multiple Choice)
4.9/5
(39)

The____ operator means not equal to.

(Multiple Choice)
4.8/5
(42)

In a while statement, if the condition is false from the outset, the statement(s) inside the loop never execute.

(True/False)
4.9/5
(39)

Because it returns a value of true or false, the condition in an if statement must be a(n) ____ expression.

(Multiple Choice)
4.9/5
(32)

A program can output data to a file.

(True/False)
4.8/5
(30)

An off-by-one error occurs when the value returned is one more or less than the expected result.

(True/False)
4.8/5
(38)

A(n) ____ is a special value that marks the end of a list.

(Multiple Choice)
4.8/5
(40)

Use an if statement to instruct a program to execute one statement if the condition is true, and another if the condition is false.

(True/False)
4.9/5
(41)

A(n) ____ is a small window that asks for information, and includes a text field and command buttons.

(Multiple Choice)
4.8/5
(36)

A program used to simulate coin toss results uses a random number generator.

(True/False)
4.9/5
(37)

____ is when the same name is used for two different methods.

(Multiple Choice)
4.8/5
(38)

An I/O exception is in the category of ____ exceptions.

(Multiple Choice)
4.9/5
(36)
Showing 21 - 40 of 47
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)