Deck 7: Control Statements Continued
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/47
العب
ملء الشاشة (f)
Deck 7: Control Statements Continued
1
The OR operator has the same precedence as + or -.
False
2
Most errors involving selection statements and loops are syntax errors.
False
3
An animated object moving in the direction of 180 degrees is moving east. ____________________
False
4
The expression !(p | | q) is equal to ____.
A) !p && !q
B) !(p && q)
C) !p | | !q
D) | | (!p !q)
A) !p && !q
B) !(p && q)
C) !p | | !q
D) | | (!p !q)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
5
In the sentence "If the sun is shining AND it is 8
A) If both operands are true, the condition as a whole is true.
A)m. then let's go for a walk; else let's stay home," which of the following is true?
B) If both operands are false, the condition is false.
C) If either operand is false, the condition is false.
D) All of the above are true.
A) If both operands are true, the condition as a whole is true.
A)m. then let's go for a walk; else let's stay home," which of the following is true?
B) If both operands are false, the condition is false.
C) If either operand is false, the condition is false.
D) All of the above are true.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
6
When evaluating an if statement, if there are two operands, there are four possibilities.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
7
In Java, the nested statement provides an alternative to the extended if statement. ____________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
8
The presence of looping statements increases the challenge of designing good test data.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
9
Complete code coverage tests all of the logical paths through a program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
10
A string is an immutable object; once it is created, its length cannot change and its characters cannot be modified. ____________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
11
Use a truth table if you are unsure about the meaning of an if statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
12
In animations, faster objects can travel a greater distance between frames than slower ones.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
13
In Java, the operator OR is represented by ____.
A) &&
B) | |
C) !
D) < >
A) &&
B) | |
C) !
D) < >
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
14
The process of short-circuit evaluation ____.
A) identifies potential run-time errors
B) identifies potential logic errors
C) stops the evaluation of a Boolean expression once it knows the value
D) creates robust programs
A) identifies potential run-time errors
B) identifies potential logic errors
C) stops the evaluation of a Boolean expression once it knows the value
D) creates robust programs
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
15
An assert statement allows the programmer to evaluate a Boolean expression and halt the program with an error message if the expression's value is false. ____________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
16
Using equivalences enables you to rewrite a condition in a more easily understood form.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
17
In Java, the operator NOT is represented by ____.
A) &&
B) | |
C) !
D) < >
A) &&
B) | |
C) !
D) < >
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
18
A Boolean variable can be either true or false. ____________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
19
Circles have an initial speed of 0 and an initial direction of 0 degrees.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
20
Indentation is a convention that indicates relationships and precedence to the compiler.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
21
FIGURE 7-2 
Figure 7-2 shows the output of a program that includes a(n) ____.
A) arithmetic overflow
B) data validation
C) boundary condition
D) assert statement

Figure 7-2 shows the output of a program that includes a(n) ____.
A) arithmetic overflow
B) data validation
C) boundary condition
D) assert statement
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
22
FIGURE 7- 1 
Figure 7-1 above is a(n) ____.
A) flowchart
B) truth table
C) evaluation grid
D) rule table

Figure 7-1 above is a(n) ____.
A) flowchart
B) truth table
C) evaluation grid
D) rule table
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
23
A combinatorial explosion is ____.
A) a type of run-time error
B) what happens when the JVM throws an exception
C) the multiplicative growth in test cases
D) a sign that your program is not robust
A) a type of run-time error
B) what happens when the JVM throws an exception
C) the multiplicative growth in test cases
D) a sign that your program is not robust
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
24
When a timer is instantiated, it is given an interval in milliseconds and a(n) ____ object.
A) listener
B) direction
C) speed
D) distance
A) listener
B) direction
C) speed
D) distance
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
25
A(n) ____ if statement is another word for an extended if statement.
A) multiway
B) nested
C) two-way
D) looped
A) multiway
B) nested
C) two-way
D) looped
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
26
A loop ____ is an assertion whose truth changes between the first and final execution of the loop.
A) validation
B) mutator
C) invariant
D) variant
A) validation
B) mutator
C) invariant
D) variant
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
27
A(n) ____ object can be used to read words from a string.
A) substring
B) char
C) reader
D) Scanner
A) substring
B) char
C) reader
D) Scanner
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
28
____________________ assurance is the process of making sure that a software product is developed to the highest standards possible.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
29
Testing under ____________________ conditions uses data at the limits of validity.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
30
A(n) ____ loop is placed within another loop.
A) double
B) embedded
C) nested
D) You cannot put a loop inside another loop.
A) double
B) embedded
C) nested
D) You cannot put a loop inside another loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
31
At minimum, test data should try to achieve ____.
A) boundary conditions
B) complete code coverage
C) extreme conditions
D) short-circuit evaluation
A) boundary conditions
B) complete code coverage
C) extreme conditions
D) short-circuit evaluation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
32
To implement the ____________________ ( ) method, calculate the distances in the x and y directions based on the object's current position, its speed, and its direction.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
33
A ____________________ program tolerates errors in user inputs and recovers gracefully.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
34
All the sets of test data that exercise a program in the same manner belong to the same ____ class.
A) assurance
B) boundary
C) logical
D) equivalence
A) assurance
B) boundary
C) logical
D) equivalence
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
35
Use the ____ operator to wrap the direction of a moving object if it is greater than 360 degrees.
A) +
B) >
C) | |
D) %
A) +
B) >
C) | |
D) %
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
36
Among other things, AI systems have been used to control ____.
A) robots
B) data validation
C) programming languages
D) compilation
A) robots
B) data validation
C) programming languages
D) compilation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
37
A loop ____ is an assertion that expresses a relationship between variables that remains constant throughout all iterations of the loop.
A) validation
B) operator
C) invariant
D) variant
A) validation
B) operator
C) invariant
D) variant
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
38
Jinling is testing a loop that has errors. She should check the value of the control variable loop at all of the following points EXCEPT ____.
A) before the loop is entered
B) in the middle of each iteration
C) after each update
D) after the loop is exited
A) before the loop is entered
B) in the middle of each iteration
C) after each update
D) after the loop is exited
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
39
The method "equals (aString)" returns a(n) ____ value.
A) int
B) boolean
C) char
D) object
A) int
B) boolean
C) char
D) object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
40
A(n) ____ assertion states what should be true before a loop is entered
A) input
B) output
C) invariant
D) variant
A) input
B) output
C) invariant
D) variant
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
41
What is a truth table used for? What other tool might you use for the same purpose? How do you know how many possibilities to include in the table?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
42
Java uses a special type of object called a(n) ____________________ to schedule events at regular intervals.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
43
Identify the letter of the choice that best matches the phrase or definition.
a.Javish
b.Boundary conditions
c.Data validation rules
d.Output assertions
e.Arithmetic overflow
Test data that assesses on or near the limits of the equivalence classes.
a.Javish
b.Boundary conditions
c.Data validation rules
d.Output assertions
e.Arithmetic overflow
Test data that assesses on or near the limits of the equivalence classes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
44
Identify the letter of the choice that best matches the phrase or definition.
a.Javish
b.Boundary conditions
c.Data validation rules
d.Output assertions
e.Arithmetic overflow
A statement in a combination of code, words, and syntax.
a.Javish
b.Boundary conditions
c.Data validation rules
d.Output assertions
e.Arithmetic overflow
A statement in a combination of code, words, and syntax.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
45
Identify the letter of the choice that best matches the phrase or definition.
a.Javish
b.Boundary conditions
c.Data validation rules
d.Output assertions
e.Arithmetic overflow
When numeric data falls outside of the valid range.
a.Javish
b.Boundary conditions
c.Data validation rules
d.Output assertions
e.Arithmetic overflow
When numeric data falls outside of the valid range.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
46
Identify the letter of the choice that best matches the phrase or definition.
a.Javish
b.Boundary conditions
c.Data validation rules
d.Output assertions
e.Arithmetic overflow
State what should be true when a loop is exited.
a.Javish
b.Boundary conditions
c.Data validation rules
d.Output assertions
e.Arithmetic overflow
State what should be true when a loop is exited.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
47
Identify the letter of the choice that best matches the phrase or definition.
a.Javish
b.Boundary conditions
c.Data validation rules
d.Output assertions
e.Arithmetic overflow
Values used to test a program.
a.Javish
b.Boundary conditions
c.Data validation rules
d.Output assertions
e.Arithmetic overflow
Values used to test a program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck