
Unit 1 CSA Code
Authored by Gareth Yeoman
Computers
12th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
6 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();
The effect of this code is that the myPainter object is now:
facing north
facing east
facing west
facing south
Answer explanation
This code runs you will turnLeft until you face south. Once you face south you will turnLeft 1 time in this example. This means you will face east.
2.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Which of the following is a TRUE statement about constructors in Java?
The constructor contains all of the methods that an object can utilize.
The constructor is used to create objects of a class.
The constructor should not have the same name as the class.
In inheritance, the parent class should always contain the keyword super.
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 south.
The Painter object is blocked from moving east.
The Painter object will crash into an object or wall.
Answer explanation
When painter can move it will continue until it runs into a wall
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
II and III
I and II
III only
I only
5.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Consider the following class headers.
public class Food { //implementation not shown }
public class Dessert extends Food { //implementation not shown }
public class Cookie extends Dessert { //implementation not shown }
Which statement below is true regarding the class declarations?
I. Food is a subclass of Cookie
II. Dessert is a superclass of Cookie
III. Cookie is a subclass of Dessert
IV. Cookie is a superclass of Food
II and III
II and IV
I and II
III only
6.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Which of the following evaluates to false?
I. true
II. !true
III. false
IV. !false
III and IV
II and III
I and IV
III only
Access all questions and much more by creating a free account
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
10 questions
Elements of Programming Test
Quiz
•
12th Grade
10 questions
Working with SmartArt
Quiz
•
7th - 12th Grade
10 questions
AP Computer Science A Multiple Choice 1
Quiz
•
9th - 12th Grade
9 questions
Lesson 12-Working with Camera Raw
Quiz
•
9th - 12th Grade
10 questions
Quiz sobre Contos
Quiz
•
12th Grade
10 questions
Pemrograman Alice 3
Quiz
•
12th Grade
10 questions
Review Quiz #2- Productivity Tools
Quiz
•
11th - 12th Grade
11 questions
LEGO Robotics Elective Level 2 - Diagnostic Test
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade