Exam 5: Making Decisions
Exam 1: Creating Java Programs61 Questions
Exam 2: Using Data67 Questions
Exam 3: Using Methods Classes and Objects66 Questions
Exam 4: More Object Concepts66 Questions
Exam 5: Making Decisions66 Questions
Exam 6: Looping66 Questions
Exam 7: Characters Strings and the Stringbuilder68 Questions
Exam 8: Arrays66 Questions
Exam 9: Advanced Array Concepts66 Questions
Exam 10: Introduction to Inheritance66 Questions
Exam 11: Advanced Inheritance Concepts66 Questions
Exam 12: Exception Handling66 Questions
Exam 13: File Input and Output66 Questions
Exam 14: Introduction to Swing Components66 Questions
Exam 15: Advanced Gui Topics66 Questions
Exam 16: Graphics66 Questions
Select questions type
Just as you can block statements that depend on an if , you can also block statements that depend on a(n) ____.
(Multiple Choice)
4.8/5
(80)
The simplest statement you can use to make a decision is the ____ statement.
(Multiple Choice)
4.8/5
(85)
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 .
(Essay)
4.7/5
(78)
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".
(Essay)
4.7/5
(78)
When an expression containing a ____ is part of an if statement, the assignment is illegal.
(Multiple Choice)
4.9/5
(84)
Why would a programmer use an && operator when using nested if statements?
(Essay)
4.9/5
(55)
Match each term with the correct statement below.
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(69)
____________________ is a tool that helps programmers plan a program's logic by writing plain English statements.
(Short Answer)
4.8/5
(85)
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.7/5
(100)
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.
(True/False)
4.8/5
(84)
Both & and | are valid Java operators, but a single & or | with integer operands operate on individual ____________________ rather than making comparisons in logical conditions as && and || do.
(Short Answer)
4.8/5
(71)
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".
(Essay)
4.8/5
(78)
When working with logical operators, you can always use ____ to change precedence.
(Multiple Choice)
4.8/5
(88)
When you use nested if statements, you must pay careful attention to placement of any else clauses.
(True/False)
5.0/5
(88)
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".
(Essay)
5.0/5
(84)
When you create a block, you must place multiple statements within it.
(True/False)
4.9/5
(56)
You can leave out the ____ statements in a switch structure.
(Multiple Choice)
4.9/5
(76)
Showing 41 - 60 of 66
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)