What does the following code fragment write to the monitor?
int sum = 14;
if ( sum < 20 )
System.out.print(“Under “);
else
System.out.print(“Over “);
System.out.printIn(“the limit.”);
Unit 23 - Pop Quiz
Quiz
•
Computers
•
12th Grade
•
Hard
Ambreen Mohsin
Used 4+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What does the following code fragment write to the monitor?
int sum = 14;
if ( sum < 20 )
System.out.print(“Under “);
else
System.out.print(“Over “);
System.out.printIn(“the limit.”);
Under
Over
Under the limit
Over the limit
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following is FALSE about Event driven programming?
Event driven programs can be run multiple times with different outcomes based on user interactions
The flow of event driven program cannot always be known ahead of time
Event driven programs do not implement algorithms
Some portion of an event driven program may never execute while the program is still running
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Look at the following line of code.
String operator = "?" ;
switch(operator)
{
case '+':
printf("%.1lf + %.1lf = %.1lf",firstNumber, secondNumber, firstNumber+secondNumber);
break;
case '-':
printf("%.1lf - %.1lf = %.1lf",firstNumber, secondNumber, firstNumber-secondNumber);
break;
default:
printf("Error! operator is not correct");
}
Which case will be executed?
Case +
Case *
Default case
All the cases
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What role does the "break" keyword play?
exits the program
exits the construct
exits the application
exits the operating system
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
OOP organizes a software into classes and objects. What exactly are objects?
Objects are subclasses
Objects are instances of classes
Objects are data types
Objects are constructors
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
How is data abstraction achieved in Java?
By using abstract keyword
By using private and public keywords
By using extend keywords
By using string keyword
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following is a looping construct?
Switch Case
If Else
do while
JOptionPane
14 questions
AP CSP Review
Quiz
•
9th Grade - University
14 questions
Section 4A: Decompose the code using functions
Quiz
•
12th Grade
10 questions
Python Flow Control
Quiz
•
9th - 12th Grade
10 questions
MOAC Word 2016 Lesson 3
Quiz
•
8th - 12th Grade
10 questions
code.org Unit 3 Intro to App Design
Quiz
•
9th - 12th Grade
15 questions
code.org CSP Unit 3 Review 20-21
Quiz
•
9th - 12th Grade
10 questions
Basic Parts of a Computer
Quiz
•
10th - 12th Grade
15 questions
Unit 1 AP CSP Review
Quiz
•
11th - 12th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University