Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

9 easy java questions! Thanks to whomever helps me!! 1. Identify the false statement. a. In a decision structure, alternative courses of action are chosen

9 easy java questions! Thanks to whomever helps me!!

1. Identify the false statement.

a. In a decision structure, alternative courses of action are chosen based on a Boolean value.
b. Pseudocode and flowcharts are both tools that are used to check the syntax of computer programs.
c. In a sequence structure, one step follows another unconditionally.

2. Identify the false statement.

a. In a Java if statement, a semicolon follows the Boolean expression.
b. In a Java if statement, the keyword if is followed by a Boolean expression within parentheses.
c. When determining equivalency in Java, you use a double equal sign.

3. Identify the false statement.

a. Indentation can be used to cause statements following an if statement to depend on the evaluation of the Boolean expression.
b. To execute more than one statement that depends on the evaluation of a Boolean expression, you use a pair of curly braces to place the dependent statements within a block.
c. When you declare a variable within a block, it is local to that block.

4. Identify the false statement.

a. A complete nested ifelse structure always fits entirely within either the if portion or the else portion of its outer ifelse statement.
b. When one if statement follows another, the first else clause encountered is paired with the first if that occurred before it.
c. Statements in which an if structure is contained inside another if structure commonly are called nested if statements.

5. Identify the false statement.

a. When you use the && and || operators, you must include a complete Boolean expression on each side.
b. The AND operator is written as two ampersands ( && ), and the OR operator is written as two pipes ( || ).
c. When you use an && or || operator, each Boolean expression that surrounds the operator is always tested in order from left to right.

6. Identify the false statement.

a. When you must make a series of decisions in a program, it is most efficient to first ask the question that is most likely to be true.
b. A range check is a series of statements that determine within which of a set of ranges a value falls.
c. The statement if(payRate < 6.00 && payRate > 50.00) can be used to select payRate values that are higher or lower than the specified limits.

7. Identify the false statement.

a. A break statement bypasses the rest of its switch structure, and execution continues with any statement after the closing curly brace of the switch structure.
b. When you must make more decisions than Java can support, you use a switch statement instead of nested ifelse statements.
c. The switch statement is useful when you need to test a single variable against a series of exact integer or character values.

8. Identify the false statement.

a. The conditional operator is used as an abbreviated version of the ifelse structure and requires two expressions separated with an exclamation point.
b. The NOT operator is written as the exclamation point ( ! ).
c. The value of any false expression becomes true when preceded by the NOT operator.

9. Identify the false statement.

a. Assume p, q, and r are all Boolean variables that have been assigned the value true. After the following statement executes, the value of p is still true. p = !(!q && !r);
b. Assume p, q, and r are all Boolean variables that have been assigned the value true. After the following statement executes, the value of p is still true. p = !(q || !r);
c. Assume p, q, and r are all Boolean variables that have been assigned the value true. After the following statement executes, the value of p is still true. p = !q || r;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases 28th British National Conference On Databases Bncod 28 Manchester Uk July 2011 Revised Selected Papers Lncs 7051

Authors: Alvaro A.A. Fernandes ,Alasdair J.G. Gray ,Khalid Belhajjame

2011th Edition

3642245765, 978-3642245763

More Books

Students also viewed these Databases questions