Deck 5: Making Decisions

ملء الشاشة (f)
exit full mode
سؤال
A ____ consists of written steps in diagram form, as a series of shapes connected by arrows.

A) pseudocode chart
B) flowchart
C) sequence structure
D) decision structure
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
When an expression containing a ____ is part of an if statement, the assignment is illegal.

A) single equal sign
B) greater than sign
C) double equal sign
D) Boolean value
سؤال
Computers contain switches that are set to on or off.
سؤال
An alternative to using a Boolean expression, such as someVariable == 10 , is to store the Boolean expression's value in a Boolean variable.
سؤال
Although it is possible to block statements that depend on an if , you cannot likewise block statements that depend on an else .
سؤال
When you place a block within an if statement, it is crucial to place the ____ correctly.

A) periods
B) angle brackets
C) commas
D) curly braces
سؤال
When you block statements, you must remember that any ____ you declare within a block is local to that block.

A) method
B) expression
C) variable
D) decision
سؤال
A(n) ____ statement is the decision structure you use when you need to take one or the other of two possible courses of action.

A) Boolean
B) dual-alternative if
C) single-alternative if
D) if
سؤال
You use the NOT operator, which is written as the exclamation point (!), to negate the result of any Boolean expression.
سؤال
Statements in which an if structure is contained inside another if structure are commonly called ____ if statements.

A) nested
B) logical
C) blocked
D) inside
سؤال
When you use nested if statements, you must pay careful attention to placement of any else clauses.
سؤال
When writing a statement with the two-line format, you must be sure to type a semicolon at the end of the first line in order to ensure accurate results.
سؤال
Although not required, it is common procedure to align the keyword if with the keyword else .
سؤال
In the switch structure, break is followed by one of the possible values for the test expression and a colon.
سؤال
You write pseudocode in everyday language, not the syntax used in a programming language.
سؤال
When you execute an if…else statement, only one of the resulting actions takes place depending on the evaluation of the ____ following the if .

A) Boolean expression
B) keyword
C) else statement
D) independent statement
سؤال
The simplest statement you can use to make a decision is the ____ statement.

A) this
B) Boolean
C) true false
D) if
سؤال
A logical structure called a(n) ____ structure is when one step follows another unconditionally.

A) straight
B) decision
C) sequence
D) unconditional
سؤال
When you create a block, you must place multiple statements within it.
سؤال
Just as you can block statements that depend on an if , you can also block statements that depend on a(n) ____.

A) Boolean expression
B) else
C) constant
D) operator
سؤال
____ is a tool that helps programmers plan a program's logic by writing plain English statements.

A) A flowchart
B) A sequence structure
C) Pseudocode
D) A decision structure
سؤال
The disadvantage to using the conditional operator is that it ____.

A) is inefficient
B) has high precedence
C) can be difficult to read
D) slows execution time
سؤال
You can use the ____, which is written as || , if you want some action to occur when at least one of two conditions is true.

A) conditional OR operator
B) logical AND operator
C) range check
D) switch statement
سؤال
A(n) ____ is particularly useful when two conditions must be met before some action is taken.

A) logical NOT operator ( ! )
B) equivalency operator ( == )
C) nested if statement
D) sequence structure
سؤال
When you use the && operator, you must include a complete _____ on each side.

A) mathematical expression
B) Boolean expression
C) variable
D) operator
سؤال
The ____ statement is useful when you need to test a single variable against a series of exact integer, character, or string values.

A) switch
B) if
C) else
D) break
سؤال
When using equals and not equals for comparisons with objects, you compare the objects' ____ instead of actual values.

A) reference fields
B) primitive data types
C) Boolean values
D) memory addresses
سؤال
A ____ chooses among alternative courses of action based on some value within a program.

A) short-circuit structure
B) sequence structure
C) decision structure
D) block structure
سؤال
A(n) ____ is a series of if statements that determine whether a value falls within a specified range.

A) scope check
B) if check
C) range test
D) range check
سؤال
The ____ operator is written as the exclamation point ( ! ).

A) equality
B) AND
C) assignment
D) NOT
سؤال
Which operator has the highest precedence?

A) exponent ( ^ )
B) NOT ( ! )
C) multiplication ( * )
D) AND ( && )
سؤال
You are never required to use a  switch  structure; you can always achieve the same results with ____ statements.

A) nested if
B) sequence structure
C) boolean
D) looping
سؤال
The ____ requires three expressions separated with a question mark and a colon.

A) flowchart
B) conditional operator
C) sequence structure
D) conditional statement
سؤال
When working with logical operators, you can always use ____ to change precedence.

A) conditional operators
B) break statements
C) parentheses
D) semicolons
سؤال
The compiler does not take indentation into account when compiling code, but consistent indentation can help readers understand a program's ____.

A) machine language
B) class
C) decision
D) logic
سؤال
<strong>  Using the flowchart above, which decision statement will correctly check that hoursWorked is greater than or equal to the FULL_WEEK constant?</strong> A) hoursWorked == FULL_WEEK B) hoursWorked > FULL_WEEK C) hoursWorked >= FULL_WEEK D) hoursWorked != FULL_WEEK <div style=padding-top: 35px> Using the flowchart above, which decision statement will correctly check that hoursWorked is greater than or equal to the FULL_WEEK constant?

A) hoursWorked == FULL_WEEK
B) hoursWorked > FULL_WEEK
C) hoursWorked >= FULL_WEEK
D) hoursWorked != FULL_WEEK
سؤال
The ____ operator is always evaluated before the OR operator.

A) Assignment
B) AND
C) Conditional
D) Logical
سؤال
____ involves choosing between alternative courses of action based on some value within a program.

A) An equivalency operator
B) A sequence structure
C) Pseudocode
D) A decision structure
سؤال
The AND operator is written as two ____.

A) plus signs
B) equal signs
C) ampersands
D) asterisks
سؤال
Both  &  and  |  are valid Java operators, but a single & or | with integer operands operates on individual ____  rather than making comparisons in logical conditions as  &&  and  ||  do.

A) variables
B) bits
C) constants
D) characters
سؤال
Match between columns
true and false
relational operator
true and false
conditional operator
true and false
Boolean values
true and false
equality
true and false
switch statement
true and false
pipes
true and false
dual-alternative
true and false
!
true and false
logical AND operator
true and false
pseudocode
true and false
flowchart
true and false
ternary operator
true and false
sequence structure
true and false
side effect
true and false
||
سؤال
Match between columns
The logical NOT operator
relational operator
The logical NOT operator
conditional operator
The logical NOT operator
Boolean values
The logical NOT operator
equality
The logical NOT operator
switch statement
The logical NOT operator
pipes
The logical NOT operator
dual-alternative
The logical NOT operator
!
The logical NOT operator
logical AND operator
The logical NOT operator
pseudocode
The logical NOT operator
flowchart
The logical NOT operator
ternary operator
The logical NOT operator
sequence structure
The logical NOT operator
side effect
The logical NOT operator
||
سؤال
An alternative to using a Boolean expression, such as quizScore == 10 , is to store the Boolean expression's value in a Boolean variable. How could you express this in Java?
سؤال
Match between columns
Two ampersands
relational operator
Two ampersands
conditional operator
Two ampersands
Boolean values
Two ampersands
equality
Two ampersands
switch statement
Two ampersands
pipes
Two ampersands
dual-alternative
Two ampersands
!
Two ampersands
logical AND operator
Two ampersands
pseudocode
Two ampersands
flowchart
Two ampersands
ternary operator
Two ampersands
sequence structure
Two ampersands
side effect
Two ampersands
||
سؤال
Match between columns
One step follows another unconditionally
relational operator
One step follows another unconditionally
conditional operator
One step follows another unconditionally
Boolean values
One step follows another unconditionally
equality
One step follows another unconditionally
switch statement
One step follows another unconditionally
pipes
One step follows another unconditionally
dual-alternative
One step follows another unconditionally
!
One step follows another unconditionally
logical AND operator
One step follows another unconditionally
pseudocode
One step follows another unconditionally
flowchart
One step follows another unconditionally
ternary operator
One step follows another unconditionally
sequence structure
One step follows another unconditionally
side effect
One step follows another unconditionally
||
سؤال
Match between columns
> or <
relational operator
> or <
conditional operator
> or <
Boolean values
> or <
equality
> or <
switch statement
> or <
pipes
> or <
dual-alternative
> or <
!
> or <
logical AND operator
> or <
pseudocode
> or <
flowchart
> or <
ternary operator
> or <
sequence structure
> or <
side effect
> or <
||
سؤال
Match between columns
A double equal sign
relational operator
A double equal sign
conditional operator
A double equal sign
Boolean values
A double equal sign
equality
A double equal sign
switch statement
A double equal sign
pipes
A double equal sign
dual-alternative
A double equal sign
!
A double equal sign
logical AND operator
A double equal sign
pseudocode
A double equal sign
flowchart
A double equal sign
ternary operator
A double equal sign
sequence structure
A double equal sign
side effect
A double equal sign
||
سؤال
Within an if or an else statement, how can you code as many dependent if statements as you need and why is this useful?
سؤال
Match between columns
Has three operands
relational operator
Has three operands
conditional operator
Has three operands
Boolean values
Has three operands
equality
Has three operands
switch statement
Has three operands
pipes
Has three operands
dual-alternative
Has three operands
!
Has three operands
logical AND operator
Has three operands
pseudocode
Has three operands
flowchart
Has three operands
ternary operator
Has three operands
sequence structure
Has three operands
side effect
Has three operands
||
سؤال
Match between columns
Separated with a question mark and a colon
relational operator
Separated with a question mark and a colon
conditional operator
Separated with a question mark and a colon
Boolean values
Separated with a question mark and a colon
equality
Separated with a question mark and a colon
switch statement
Separated with a question mark and a colon
pipes
Separated with a question mark and a colon
dual-alternative
Separated with a question mark and a colon
!
Separated with a question mark and a colon
logical AND operator
Separated with a question mark and a colon
pseudocode
Separated with a question mark and a colon
flowchart
Separated with a question mark and a colon
ternary operator
Separated with a question mark and a colon
sequence structure
Separated with a question mark and a colon
side effect
Separated with a question mark and a colon
||
سؤال
Why do programmers use pseudocode?
سؤال
Describe how a sequence structure works.
سؤال
Match between columns
An alternative to using a series of nested if statements
relational operator
An alternative to using a series of nested if statements
conditional operator
An alternative to using a series of nested if statements
Boolean values
An alternative to using a series of nested if statements
equality
An alternative to using a series of nested if statements
switch statement
An alternative to using a series of nested if statements
pipes
An alternative to using a series of nested if statements
dual-alternative
An alternative to using a series of nested if statements
!
An alternative to using a series of nested if statements
logical AND operator
An alternative to using a series of nested if statements
pseudocode
An alternative to using a series of nested if statements
flowchart
An alternative to using a series of nested if statements
ternary operator
An alternative to using a series of nested if statements
sequence structure
An alternative to using a series of nested if statements
side effect
An alternative to using a series of nested if statements
||
سؤال
Match between columns
Sequence of steps written in diagram form
relational operator
Sequence of steps written in diagram form
conditional operator
Sequence of steps written in diagram form
Boolean values
Sequence of steps written in diagram form
equality
Sequence of steps written in diagram form
switch statement
Sequence of steps written in diagram form
pipes
Sequence of steps written in diagram form
dual-alternative
Sequence of steps written in diagram form
!
Sequence of steps written in diagram form
logical AND operator
Sequence of steps written in diagram form
pseudocode
Sequence of steps written in diagram form
flowchart
Sequence of steps written in diagram form
ternary operator
Sequence of steps written in diagram form
sequence structure
Sequence of steps written in diagram form
side effect
Sequence of steps written in diagram form
||
سؤال
Match between columns
Used in the OR operator
relational operator
Used in the OR operator
conditional operator
Used in the OR operator
Boolean values
Used in the OR operator
equality
Used in the OR operator
switch statement
Used in the OR operator
pipes
Used in the OR operator
dual-alternative
Used in the OR operator
!
Used in the OR operator
logical AND operator
Used in the OR operator
pseudocode
Used in the OR operator
flowchart
Used in the OR operator
ternary operator
Used in the OR operator
sequence structure
Used in the OR operator
side effect
Used in the OR operator
||
سؤال
Match between columns
Anything a method does other than altering a local variable or returning a value
relational operator
Anything a method does other than altering a local variable or returning a value
conditional operator
Anything a method does other than altering a local variable or returning a value
Boolean values
Anything a method does other than altering a local variable or returning a value
equality
Anything a method does other than altering a local variable or returning a value
switch statement
Anything a method does other than altering a local variable or returning a value
pipes
Anything a method does other than altering a local variable or returning a value
dual-alternative
Anything a method does other than altering a local variable or returning a value
!
Anything a method does other than altering a local variable or returning a value
logical AND operator
Anything a method does other than altering a local variable or returning a value
pseudocode
Anything a method does other than altering a local variable or returning a value
flowchart
Anything a method does other than altering a local variable or returning a value
ternary operator
Anything a method does other than altering a local variable or returning a value
sequence structure
Anything a method does other than altering a local variable or returning a value
side effect
Anything a method does other than altering a local variable or returning a value
||
سؤال
Match between columns
Two possible courses of action
relational operator
Two possible courses of action
conditional operator
Two possible courses of action
Boolean values
Two possible courses of action
equality
Two possible courses of action
switch statement
Two possible courses of action
pipes
Two possible courses of action
dual-alternative
Two possible courses of action
!
Two possible courses of action
logical AND operator
Two possible courses of action
pseudocode
Two possible courses of action
flowchart
Two possible courses of action
ternary operator
Two possible courses of action
sequence structure
Two possible courses of action
side effect
Two possible courses of action
||
سؤال
Match between columns
Tool that helps plan a program's logic by writing down steps in plain English
relational operator
Tool that helps plan a program's logic by writing down steps in plain English
conditional operator
Tool that helps plan a program's logic by writing down steps in plain English
Boolean values
Tool that helps plan a program's logic by writing down steps in plain English
equality
Tool that helps plan a program's logic by writing down steps in plain English
switch statement
Tool that helps plan a program's logic by writing down steps in plain English
pipes
Tool that helps plan a program's logic by writing down steps in plain English
dual-alternative
Tool that helps plan a program's logic by writing down steps in plain English
!
Tool that helps plan a program's logic by writing down steps in plain English
logical AND operator
Tool that helps plan a program's logic by writing down steps in plain English
pseudocode
Tool that helps plan a program's logic by writing down steps in plain English
flowchart
Tool that helps plan a program's logic by writing down steps in plain English
ternary operator
Tool that helps plan a program's logic by writing down steps in plain English
sequence structure
Tool that helps plan a program's logic by writing down steps in plain English
side effect
Tool that helps plan a program's logic by writing down steps in plain English
||
سؤال
Match between columns
The logical OR operator
relational operator
The logical OR operator
conditional operator
The logical OR operator
Boolean values
The logical OR operator
equality
The logical OR operator
switch statement
The logical OR operator
pipes
The logical OR operator
dual-alternative
The logical OR operator
!
The logical OR operator
logical AND operator
The logical OR operator
pseudocode
The logical OR operator
flowchart
The logical OR operator
ternary operator
The logical OR operator
sequence structure
The logical OR operator
side effect
The logical OR operator
||
سؤال
Why would a programmer execute more than one statement that depends on the evaluation of a Boolean expression, and how could he or she do it in Java?
سؤال
What is a range check?  Provide an example of a range check using a series of if..else statements using the values defined below.
final double HIGH_LIM = 1000.00;
final double HIGH_RATE = 0.08;
final double MED_LIM = 500.00;
final double MED_RATE = 0.06;
final double LOW_RATE = 0.05;
سؤال
if(qtySold > QUOTA)
    bonusPay = 50;
    totalPay = regPay + bonusPay;
System.out.println("Your totalPay amount is " + totalPay);
Why is the above code incorrect? Write the code that will provide the correct result.
سؤال
if(firstValue == secondValue)
{
    int total = firstValue + secondVaue;
    System.out.println("The values are equal");
}
System.out.println("The total is " + total);
Why will the above println() statement cause an error?
سؤال
Write a nested if statement that will check if the variable qtySold is greater than the QTY_QUOTA constant. If true, evaluate a second expression that will check if the variable totalSales is greater than the constant SALES_QUOTA . If the second expression is also true, create an assignment statement that will assign the constant BONUSAMT to the variable bonus . After BONUSAMT is assigned, the if structure ends.
سؤال
List and explain the keywords used with the switch statement.
سؤال
Write a single-alternative if statement that will check if a variable named maxValue is equal to 100. If true, use a println statement to output "You have reached the limit".
سؤال
Why would a programmer use an && operator when using nested if statements?
سؤال
Create an if statement that checks if the variable salesAmt is greater than or equal to the QUOTA_AMT constant. Use the logical OR operator to also check if salesAmt is greater than or equal to the HIGH_SALES constant. If either expression is true, assign the value of the LARGE_QUOTA constant to the variable bonusAmt .
سؤال
public class Student
{
    private int studentNum;
    private int studentScore;
    public int MAX_NUM = 500;
    public int MAX_SCORE = 100;
    Student(int num, int score)
    {
    }
Decision making can be used to control the allowed values in an object's fields. In the above code, the Student class contains two fields that hold a student number and a score. A constructor accepts values for these fields as parameters. Write the code between the curly brackets that will determine whether the value of num is less than the MAX_NUM constant. If true, assign the value of num to studentNum . Otherwise, assign the value of MAX_NUM to the studentNum . Then check if the value of score is less than or equal to MAX_SCORE . If true, assign the value of score to studentScore . Otherwise, assign 0 to studentScore .
سؤال
Create an if…else statement that will check if the maxValue variable is equal to 100. If true, create a println statement that will output "Max reached". If false, create a println statement to output "Keep trying".
سؤال
  Use the above flowchart to create the code using the logical && operator to determine if a SALES_BONUS will be assigned to the variable bonus .<div style=padding-top: 35px> Use the above flowchart to create the code using the logical && operator to determine if a SALES_BONUS will be assigned to the variable bonus .
سؤال
Explain the use of the NOT operator.
سؤال

​   Using the above flowchart and code, why will the above statements execute but provide unintended results? Write the statement correctly.<div style=padding-top: 35px> Using the above flowchart and code, why will the above statements execute but provide unintended results? Write the statement correctly.
سؤال
What is wrong with the following statement? How could you correct it?
if(payRate < 5.85 && payRate > 60)
System.out.println("Error in pay rate");
سؤال
In Boolean expressions, when you want to execute more than one statement based on the results of the expression, you place statements within a block. What is a block and why is it important in decision statements? Why are curly braces crucial when blocking an if statement?
سؤال
if (maxValue = 100)
    System.out.println ("Your limit has been reached");
Why is the above if statement illegal? How would you fix it?
سؤال
Create an if statement that will check if the variable salesAmt is greater than the constant SALES_QUOTA . If true, create a block statement that will calculate salesAmt * BONUS_PERCENT and store the result in a variable named bonusPay . The block statement will then compute totalPay by adding salesAmt to bonusPay . Outside of the if structure, add a println statement that will output the totalPay value. Be sure to use curly braces and semicolons appropriately.
سؤال
Create a switch statement that will test the value of a variable named score . If score has a value of 5, create a println statement that will output "Excellent". If score has a value of 4, create a println statement that will output "Great". If score has a value of 3, create a println statement that will output "Good". If score has a value of 2, create a println statement that will output "Fair". If score has a value of 1, create a println statement that will output "Needs improvement". If score does not contain a matching value for any of the case statements, create a println statement that will output "Retake test".
سؤال
  Using the above flowchart, write the nested if…else statements that will correctly choose among alternative courses of action based on the values of itemsSold and totalValue .<div style=padding-top: 35px> Using the above flowchart, write the nested if…else statements that will correctly choose among alternative courses of action based on the values of itemsSold and totalValue .
سؤال
What is a conditional operator? Show an example of an expression that uses a conditional operator.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/80
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 5: Making Decisions
1
A ____ consists of written steps in diagram form, as a series of shapes connected by arrows.

A) pseudocode chart
B) flowchart
C) sequence structure
D) decision structure
B
2
When an expression containing a ____ is part of an if statement, the assignment is illegal.

A) single equal sign
B) greater than sign
C) double equal sign
D) Boolean value
A
3
Computers contain switches that are set to on or off.
True
4
An alternative to using a Boolean expression, such as someVariable == 10 , is to store the Boolean expression's value in a Boolean variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
5
Although it is possible to block statements that depend on an if , you cannot likewise block statements that depend on an else .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
6
When you place a block within an if statement, it is crucial to place the ____ correctly.

A) periods
B) angle brackets
C) commas
D) curly braces
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
7
When you block statements, you must remember that any ____ you declare within a block is local to that block.

A) method
B) expression
C) variable
D) decision
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
8
A(n) ____ statement is the decision structure you use when you need to take one or the other of two possible courses of action.

A) Boolean
B) dual-alternative if
C) single-alternative if
D) if
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
9
You use the NOT operator, which is written as the exclamation point (!), to negate the result of any Boolean expression.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
10
Statements in which an if structure is contained inside another if structure are commonly called ____ if statements.

A) nested
B) logical
C) blocked
D) inside
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
11
When you use nested if statements, you must pay careful attention to placement of any else clauses.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
12
When writing a statement with the two-line format, you must be sure to type a semicolon at the end of the first line in order to ensure accurate results.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
13
Although not required, it is common procedure to align the keyword if with the keyword else .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
14
In the switch structure, break is followed by one of the possible values for the test expression and a colon.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
15
You write pseudocode in everyday language, not the syntax used in a programming language.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
16
When you execute an if…else statement, only one of the resulting actions takes place depending on the evaluation of the ____ following the if .

A) Boolean expression
B) keyword
C) else statement
D) independent statement
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
17
The simplest statement you can use to make a decision is the ____ statement.

A) this
B) Boolean
C) true false
D) if
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
18
A logical structure called a(n) ____ structure is when one step follows another unconditionally.

A) straight
B) decision
C) sequence
D) unconditional
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
19
When you create a block, you must place multiple statements within it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
20
Just as you can block statements that depend on an if , you can also block statements that depend on a(n) ____.

A) Boolean expression
B) else
C) constant
D) operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
21
____ is a tool that helps programmers plan a program's logic by writing plain English statements.

A) A flowchart
B) A sequence structure
C) Pseudocode
D) A decision structure
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
22
The disadvantage to using the conditional operator is that it ____.

A) is inefficient
B) has high precedence
C) can be difficult to read
D) slows execution time
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
23
You can use the ____, which is written as || , if you want some action to occur when at least one of two conditions is true.

A) conditional OR operator
B) logical AND operator
C) range check
D) switch statement
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
24
A(n) ____ is particularly useful when two conditions must be met before some action is taken.

A) logical NOT operator ( ! )
B) equivalency operator ( == )
C) nested if statement
D) sequence structure
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
25
When you use the && operator, you must include a complete _____ on each side.

A) mathematical expression
B) Boolean expression
C) variable
D) operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
26
The ____ statement is useful when you need to test a single variable against a series of exact integer, character, or string values.

A) switch
B) if
C) else
D) break
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
27
When using equals and not equals for comparisons with objects, you compare the objects' ____ instead of actual values.

A) reference fields
B) primitive data types
C) Boolean values
D) memory addresses
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
28
A ____ chooses among alternative courses of action based on some value within a program.

A) short-circuit structure
B) sequence structure
C) decision structure
D) block structure
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
29
A(n) ____ is a series of if statements that determine whether a value falls within a specified range.

A) scope check
B) if check
C) range test
D) range check
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
30
The ____ operator is written as the exclamation point ( ! ).

A) equality
B) AND
C) assignment
D) NOT
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
31
Which operator has the highest precedence?

A) exponent ( ^ )
B) NOT ( ! )
C) multiplication ( * )
D) AND ( && )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
32
You are never required to use a  switch  structure; you can always achieve the same results with ____ statements.

A) nested if
B) sequence structure
C) boolean
D) looping
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
33
The ____ requires three expressions separated with a question mark and a colon.

A) flowchart
B) conditional operator
C) sequence structure
D) conditional statement
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
34
When working with logical operators, you can always use ____ to change precedence.

A) conditional operators
B) break statements
C) parentheses
D) semicolons
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
35
The compiler does not take indentation into account when compiling code, but consistent indentation can help readers understand a program's ____.

A) machine language
B) class
C) decision
D) logic
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
36
<strong>  Using the flowchart above, which decision statement will correctly check that hoursWorked is greater than or equal to the FULL_WEEK constant?</strong> A) hoursWorked == FULL_WEEK B) hoursWorked > FULL_WEEK C) hoursWorked >= FULL_WEEK D) hoursWorked != FULL_WEEK Using the flowchart above, which decision statement will correctly check that hoursWorked is greater than or equal to the FULL_WEEK constant?

A) hoursWorked == FULL_WEEK
B) hoursWorked > FULL_WEEK
C) hoursWorked >= FULL_WEEK
D) hoursWorked != FULL_WEEK
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
37
The ____ operator is always evaluated before the OR operator.

A) Assignment
B) AND
C) Conditional
D) Logical
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
38
____ involves choosing between alternative courses of action based on some value within a program.

A) An equivalency operator
B) A sequence structure
C) Pseudocode
D) A decision structure
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
39
The AND operator is written as two ____.

A) plus signs
B) equal signs
C) ampersands
D) asterisks
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
40
Both  &  and  |  are valid Java operators, but a single & or | with integer operands operates on individual ____  rather than making comparisons in logical conditions as  &&  and  ||  do.

A) variables
B) bits
C) constants
D) characters
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
41
Match between columns
true and false
relational operator
true and false
conditional operator
true and false
Boolean values
true and false
equality
true and false
switch statement
true and false
pipes
true and false
dual-alternative
true and false
!
true and false
logical AND operator
true and false
pseudocode
true and false
flowchart
true and false
ternary operator
true and false
sequence structure
true and false
side effect
true and false
||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
42
Match between columns
The logical NOT operator
relational operator
The logical NOT operator
conditional operator
The logical NOT operator
Boolean values
The logical NOT operator
equality
The logical NOT operator
switch statement
The logical NOT operator
pipes
The logical NOT operator
dual-alternative
The logical NOT operator
!
The logical NOT operator
logical AND operator
The logical NOT operator
pseudocode
The logical NOT operator
flowchart
The logical NOT operator
ternary operator
The logical NOT operator
sequence structure
The logical NOT operator
side effect
The logical NOT operator
||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
43
An alternative to using a Boolean expression, such as quizScore == 10 , is to store the Boolean expression's value in a Boolean variable. How could you express this in Java?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
44
Match between columns
Two ampersands
relational operator
Two ampersands
conditional operator
Two ampersands
Boolean values
Two ampersands
equality
Two ampersands
switch statement
Two ampersands
pipes
Two ampersands
dual-alternative
Two ampersands
!
Two ampersands
logical AND operator
Two ampersands
pseudocode
Two ampersands
flowchart
Two ampersands
ternary operator
Two ampersands
sequence structure
Two ampersands
side effect
Two ampersands
||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
45
Match between columns
One step follows another unconditionally
relational operator
One step follows another unconditionally
conditional operator
One step follows another unconditionally
Boolean values
One step follows another unconditionally
equality
One step follows another unconditionally
switch statement
One step follows another unconditionally
pipes
One step follows another unconditionally
dual-alternative
One step follows another unconditionally
!
One step follows another unconditionally
logical AND operator
One step follows another unconditionally
pseudocode
One step follows another unconditionally
flowchart
One step follows another unconditionally
ternary operator
One step follows another unconditionally
sequence structure
One step follows another unconditionally
side effect
One step follows another unconditionally
||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
46
Match between columns
> or <
relational operator
> or <
conditional operator
> or <
Boolean values
> or <
equality
> or <
switch statement
> or <
pipes
> or <
dual-alternative
> or <
!
> or <
logical AND operator
> or <
pseudocode
> or <
flowchart
> or <
ternary operator
> or <
sequence structure
> or <
side effect
> or <
||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
47
Match between columns
A double equal sign
relational operator
A double equal sign
conditional operator
A double equal sign
Boolean values
A double equal sign
equality
A double equal sign
switch statement
A double equal sign
pipes
A double equal sign
dual-alternative
A double equal sign
!
A double equal sign
logical AND operator
A double equal sign
pseudocode
A double equal sign
flowchart
A double equal sign
ternary operator
A double equal sign
sequence structure
A double equal sign
side effect
A double equal sign
||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
48
Within an if or an else statement, how can you code as many dependent if statements as you need and why is this useful?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
49
Match between columns
Has three operands
relational operator
Has three operands
conditional operator
Has three operands
Boolean values
Has three operands
equality
Has three operands
switch statement
Has three operands
pipes
Has three operands
dual-alternative
Has three operands
!
Has three operands
logical AND operator
Has three operands
pseudocode
Has three operands
flowchart
Has three operands
ternary operator
Has three operands
sequence structure
Has three operands
side effect
Has three operands
||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
50
Match between columns
Separated with a question mark and a colon
relational operator
Separated with a question mark and a colon
conditional operator
Separated with a question mark and a colon
Boolean values
Separated with a question mark and a colon
equality
Separated with a question mark and a colon
switch statement
Separated with a question mark and a colon
pipes
Separated with a question mark and a colon
dual-alternative
Separated with a question mark and a colon
!
Separated with a question mark and a colon
logical AND operator
Separated with a question mark and a colon
pseudocode
Separated with a question mark and a colon
flowchart
Separated with a question mark and a colon
ternary operator
Separated with a question mark and a colon
sequence structure
Separated with a question mark and a colon
side effect
Separated with a question mark and a colon
||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
51
Why do programmers use pseudocode?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
52
Describe how a sequence structure works.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
53
Match between columns
An alternative to using a series of nested if statements
relational operator
An alternative to using a series of nested if statements
conditional operator
An alternative to using a series of nested if statements
Boolean values
An alternative to using a series of nested if statements
equality
An alternative to using a series of nested if statements
switch statement
An alternative to using a series of nested if statements
pipes
An alternative to using a series of nested if statements
dual-alternative
An alternative to using a series of nested if statements
!
An alternative to using a series of nested if statements
logical AND operator
An alternative to using a series of nested if statements
pseudocode
An alternative to using a series of nested if statements
flowchart
An alternative to using a series of nested if statements
ternary operator
An alternative to using a series of nested if statements
sequence structure
An alternative to using a series of nested if statements
side effect
An alternative to using a series of nested if statements
||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
54
Match between columns
Sequence of steps written in diagram form
relational operator
Sequence of steps written in diagram form
conditional operator
Sequence of steps written in diagram form
Boolean values
Sequence of steps written in diagram form
equality
Sequence of steps written in diagram form
switch statement
Sequence of steps written in diagram form
pipes
Sequence of steps written in diagram form
dual-alternative
Sequence of steps written in diagram form
!
Sequence of steps written in diagram form
logical AND operator
Sequence of steps written in diagram form
pseudocode
Sequence of steps written in diagram form
flowchart
Sequence of steps written in diagram form
ternary operator
Sequence of steps written in diagram form
sequence structure
Sequence of steps written in diagram form
side effect
Sequence of steps written in diagram form
||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
55
Match between columns
Used in the OR operator
relational operator
Used in the OR operator
conditional operator
Used in the OR operator
Boolean values
Used in the OR operator
equality
Used in the OR operator
switch statement
Used in the OR operator
pipes
Used in the OR operator
dual-alternative
Used in the OR operator
!
Used in the OR operator
logical AND operator
Used in the OR operator
pseudocode
Used in the OR operator
flowchart
Used in the OR operator
ternary operator
Used in the OR operator
sequence structure
Used in the OR operator
side effect
Used in the OR operator
||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
56
Match between columns
Anything a method does other than altering a local variable or returning a value
relational operator
Anything a method does other than altering a local variable or returning a value
conditional operator
Anything a method does other than altering a local variable or returning a value
Boolean values
Anything a method does other than altering a local variable or returning a value
equality
Anything a method does other than altering a local variable or returning a value
switch statement
Anything a method does other than altering a local variable or returning a value
pipes
Anything a method does other than altering a local variable or returning a value
dual-alternative
Anything a method does other than altering a local variable or returning a value
!
Anything a method does other than altering a local variable or returning a value
logical AND operator
Anything a method does other than altering a local variable or returning a value
pseudocode
Anything a method does other than altering a local variable or returning a value
flowchart
Anything a method does other than altering a local variable or returning a value
ternary operator
Anything a method does other than altering a local variable or returning a value
sequence structure
Anything a method does other than altering a local variable or returning a value
side effect
Anything a method does other than altering a local variable or returning a value
||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
57
Match between columns
Two possible courses of action
relational operator
Two possible courses of action
conditional operator
Two possible courses of action
Boolean values
Two possible courses of action
equality
Two possible courses of action
switch statement
Two possible courses of action
pipes
Two possible courses of action
dual-alternative
Two possible courses of action
!
Two possible courses of action
logical AND operator
Two possible courses of action
pseudocode
Two possible courses of action
flowchart
Two possible courses of action
ternary operator
Two possible courses of action
sequence structure
Two possible courses of action
side effect
Two possible courses of action
||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
58
Match between columns
Tool that helps plan a program's logic by writing down steps in plain English
relational operator
Tool that helps plan a program's logic by writing down steps in plain English
conditional operator
Tool that helps plan a program's logic by writing down steps in plain English
Boolean values
Tool that helps plan a program's logic by writing down steps in plain English
equality
Tool that helps plan a program's logic by writing down steps in plain English
switch statement
Tool that helps plan a program's logic by writing down steps in plain English
pipes
Tool that helps plan a program's logic by writing down steps in plain English
dual-alternative
Tool that helps plan a program's logic by writing down steps in plain English
!
Tool that helps plan a program's logic by writing down steps in plain English
logical AND operator
Tool that helps plan a program's logic by writing down steps in plain English
pseudocode
Tool that helps plan a program's logic by writing down steps in plain English
flowchart
Tool that helps plan a program's logic by writing down steps in plain English
ternary operator
Tool that helps plan a program's logic by writing down steps in plain English
sequence structure
Tool that helps plan a program's logic by writing down steps in plain English
side effect
Tool that helps plan a program's logic by writing down steps in plain English
||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
59
Match between columns
The logical OR operator
relational operator
The logical OR operator
conditional operator
The logical OR operator
Boolean values
The logical OR operator
equality
The logical OR operator
switch statement
The logical OR operator
pipes
The logical OR operator
dual-alternative
The logical OR operator
!
The logical OR operator
logical AND operator
The logical OR operator
pseudocode
The logical OR operator
flowchart
The logical OR operator
ternary operator
The logical OR operator
sequence structure
The logical OR operator
side effect
The logical OR operator
||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
60
Why would a programmer execute more than one statement that depends on the evaluation of a Boolean expression, and how could he or she do it in Java?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
61
What is a range check?  Provide an example of a range check using a series of if..else statements using the values defined below.
final double HIGH_LIM = 1000.00;
final double HIGH_RATE = 0.08;
final double MED_LIM = 500.00;
final double MED_RATE = 0.06;
final double LOW_RATE = 0.05;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
62
if(qtySold > QUOTA)
    bonusPay = 50;
    totalPay = regPay + bonusPay;
System.out.println("Your totalPay amount is " + totalPay);
Why is the above code incorrect? Write the code that will provide the correct result.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
63
if(firstValue == secondValue)
{
    int total = firstValue + secondVaue;
    System.out.println("The values are equal");
}
System.out.println("The total is " + total);
Why will the above println() statement cause an error?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
64
Write a nested if statement that will check if the variable qtySold is greater than the QTY_QUOTA constant. If true, evaluate a second expression that will check if the variable totalSales is greater than the constant SALES_QUOTA . If the second expression is also true, create an assignment statement that will assign the constant BONUSAMT to the variable bonus . After BONUSAMT is assigned, the if structure ends.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
65
List and explain the keywords used with the switch statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
66
Write a single-alternative if statement that will check if a variable named maxValue is equal to 100. If true, use a println statement to output "You have reached the limit".
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
67
Why would a programmer use an && operator when using nested if statements?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
68
Create an if statement that checks if the variable salesAmt is greater than or equal to the QUOTA_AMT constant. Use the logical OR operator to also check if salesAmt is greater than or equal to the HIGH_SALES constant. If either expression is true, assign the value of the LARGE_QUOTA constant to the variable bonusAmt .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
69
public class Student
{
    private int studentNum;
    private int studentScore;
    public int MAX_NUM = 500;
    public int MAX_SCORE = 100;
    Student(int num, int score)
    {
    }
Decision making can be used to control the allowed values in an object's fields. In the above code, the Student class contains two fields that hold a student number and a score. A constructor accepts values for these fields as parameters. Write the code between the curly brackets that will determine whether the value of num is less than the MAX_NUM constant. If true, assign the value of num to studentNum . Otherwise, assign the value of MAX_NUM to the studentNum . Then check if the value of score is less than or equal to MAX_SCORE . If true, assign the value of score to studentScore . Otherwise, assign 0 to studentScore .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
70
Create an if…else statement that will check if the maxValue variable is equal to 100. If true, create a println statement that will output "Max reached". If false, create a println statement to output "Keep trying".
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
71
  Use the above flowchart to create the code using the logical && operator to determine if a SALES_BONUS will be assigned to the variable bonus . Use the above flowchart to create the code using the logical && operator to determine if a SALES_BONUS will be assigned to the variable bonus .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
72
Explain the use of the NOT operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
73

​   Using the above flowchart and code, why will the above statements execute but provide unintended results? Write the statement correctly. Using the above flowchart and code, why will the above statements execute but provide unintended results? Write the statement correctly.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
74
What is wrong with the following statement? How could you correct it?
if(payRate < 5.85 && payRate > 60)
System.out.println("Error in pay rate");
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
75
In Boolean expressions, when you want to execute more than one statement based on the results of the expression, you place statements within a block. What is a block and why is it important in decision statements? Why are curly braces crucial when blocking an if statement?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
76
if (maxValue = 100)
    System.out.println ("Your limit has been reached");
Why is the above if statement illegal? How would you fix it?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
77
Create an if statement that will check if the variable salesAmt is greater than the constant SALES_QUOTA . If true, create a block statement that will calculate salesAmt * BONUS_PERCENT and store the result in a variable named bonusPay . The block statement will then compute totalPay by adding salesAmt to bonusPay . Outside of the if structure, add a println statement that will output the totalPay value. Be sure to use curly braces and semicolons appropriately.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
78
Create a switch statement that will test the value of a variable named score . If score has a value of 5, create a println statement that will output "Excellent". If score has a value of 4, create a println statement that will output "Great". If score has a value of 3, create a println statement that will output "Good". If score has a value of 2, create a println statement that will output "Fair". If score has a value of 1, create a println statement that will output "Needs improvement". If score does not contain a matching value for any of the case statements, create a println statement that will output "Retake test".
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
79
  Using the above flowchart, write the nested if…else statements that will correctly choose among alternative courses of action based on the values of itemsSold and totalValue . Using the above flowchart, write the nested if…else statements that will correctly choose among alternative courses of action based on the values of itemsSold and totalValue .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
80
What is a conditional operator? Show an example of an expression that uses a conditional operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 80 في هذه المجموعة.