Exam 5: Making Decisions
Exam 1: Creating Your First Java Classes76 Questions
Exam 2: Using Data81 Questions
Exam 3: Using Methods, Classes and Objects79 Questions
Exam 4: More Object Concepts84 Questions
Exam 5: Making Decisions80 Questions
Exam 6: Looping77 Questions
Exam 7: Characters, Strings and the Stringbuilder82 Questions
Exam 8: Arrays77 Questions
Exam 9: Advanced Array Concepts80 Questions
Exam 10: Introduction to Inheritance78 Questions
Exam 11: Advanced Inheritance Concepts78 Questions
Exam 12: Exception Handling79 Questions
Exam 13: File Input and Output78 Questions
Exam 14: Introduction to Swing Components79 Questions
Exam 15: Using Javafx and Scene Builder65 Questions
Select questions type
Match each term with the correct statement below.
Premises:
true and false
Responses:
relational operator
Boolean values
side effect
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(90)
The disadvantage to using the conditional operator is that it ____.
(Multiple Choice)
4.8/5
(70)
When you use nested if statements, you must pay careful attention to placement of any else clauses.
(True/False)
5.0/5
(78)
Using the flowchart above, which decision statement will correctly check that hoursWorked is greater than or equal to the FULL_WEEK constant?
(Multiple Choice)
4.9/5
(89)
Match each term with the correct statement below.
Premises:
> or <
Responses:
side effect
pipes
conditional operator
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(90)
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");
(Essay)
4.7/5
(78)
Match each term with the correct statement below.
Premises:
The logical OR operator
Responses:
conditional operator
equality
sequence structure
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(73)
You are never required to use a switch structure; you can always achieve the same results with ____ statements.
(Multiple Choice)
4.8/5
(90)
____ is a tool that helps programmers plan a program's logic by writing plain English statements.
(Multiple Choice)
4.8/5
(86)
When you execute an if…else statement, only one of the resulting actions takes place depending on the evaluation of the ____ following the if .
(Multiple Choice)
4.9/5
(89)
Match each term with the correct statement below.
Premises:
Used in the OR operator
Responses:
Boolean values
||
ternary operator
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(71)
Why would a programmer use an && operator when using nested if statements?
(Essay)
4.9/5
(83)
The ____ requires three expressions separated with a question mark and a colon.
(Multiple Choice)
4.8/5
(96)
A logical structure called a(n) ____ structure is when one step follows another unconditionally.
(Multiple Choice)
4.7/5
(87)
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;
(Essay)
4.8/5
(65)
The ____ operator is written as the exclamation point ( ! ).
(Multiple Choice)
4.8/5
(82)
Match each term with the correct statement below.
Premises:
Two ampersands
Responses:
logical AND operator
switch statement
Boolean values
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(80)
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.
(Multiple Choice)
4.8/5
(82)
The ____ operator is always evaluated before the OR operator.
(Multiple Choice)
4.9/5
(62)
Showing 61 - 80 of 80
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)