Unit 1
Quiz
•
Computers
•
11th Grade
•
Medium
JOYCE PACHECO
Used 4+ times
FREE Resource
Enhance your content in a minute
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
A Painter object called myPainter is facing north. Consider the following code segment.
while (!myPainter.isFacingSouth()) { myPainter.turnLeft(); }
myPainter.turnLeft();
myPainter.turnLeft();
The effect of this code is that the myPainter object is now:
facing north
facing east
facing west
facing south
2.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Which of the following is a TRUE statement about constructors in Java?
A. The constructor contains all of the methods that an object can utilize.
B. Constructors should be made private to keep all information safe and secure.
C. The constructor should not have the same name as the class.
D. In inheritance, the parent class should always contain the keyword super.
E. The constructor is used to create objects of a class.
A
D
C
E
B
3.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
A Painter object called myPainter is initially facing east. Consider the following code segment.
while (myPainter.canMove()) { myPainter.move(); }
After the loop has terminated, which of the following MUST be true?
The Painter object is blocked from moving north.
The Painter object is blocked from moving east.
The Painter object is blocked from moving west.
The Painter object is blocked from moving south.
4.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Which of the following are inherited when one class extends another?
I. private attributes
II. public constructors
III. public methods
A. I only
B. III only
C. I and II
D. II and III
E. I, II, and III
A
B
C
D
E
5.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Consider the following code segment.
if (myPainter.isFacingNorth()) {
myPainter.move();
myPainter.move(); }
if (!myPainter.isFacingNorth()) {
myPainter.move();
myPainter.paint("green"); }
Which of the following is equivalent?
6.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Given a Painter object called myPainter, which method call would cause a syntax error?
myPainter.move();
myPainter.turnLeft();
myPainter.takePaint();
myPainter.canMove();
myPainter.paint();
7.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Which of the following correctly instantiates a new Painter object?
Painter daVinci = new Painter();
daVinci Painter = new Painter();
Painter daVinci = Painter();
Painter() daVinci = new Painter;
Painter daVinci = Painter;
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
0 questions
CS A Unit 1 Review
Quiz
•
0 questions
Unit 1 CSA Code
Quiz
•
0 questions
Java Inheritance and Method Quiz
Quiz
•
0 questions
AP CSA Unit 1 Review
Quiz
•
0 questions
Java Classes Mastery Quiz
Quiz
•
0 questions
AP CSA | U1: Object-Oriented Programming By Mr. Benvenuto
Quiz
•
0 questions
Object Oriented Programming Unit Quiz
Quiz
•
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade
20 questions
christmas songs
Quiz
•
KG - University
