
Java Inheritance and Method Quiz
Quiz
•
Professional Development
•
12th Grade
•
Medium
COY DUANE WEBB
Used 14+ times
FREE Resource
Enhance your content in a minute
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is inheritance in Java?
Creating a new class using an existing class
Overloading methods
Changing the behavior of a superclass
Creating multiple instances of a class
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do we declare a PainterPlus class in the Painter superclass?
public void painterplus extends painter
public void PainterPlus extends Painter {
public class PainterPlus extends Painter() {
public class PainterPlus extends Painter {
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
True or False: A superclass can use methods from a subclass.
True
False
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do we instantiate an object in the PainterPlus class?
PainterPlus = new PainterPlus();
PainterPlus painter = new PainterPlus();
new PainterPlus Painter();
Painter painter = PainterPlus();
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct while loop to make the painter continuously move until it can't?
while (canMove()) { move();
}
while (canMove); { move();
}
while (isMoving()) { move();
}
while (canMove()) { stop();
}
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to write a method paintToEmpty that makes the painter paint until it runs out of paint?
public void paintToEmpty() { while (hasPaint()) { paint(); } }
public void paintToEmpty() { while (canPaint()) { paint(); } }
public void paintToEmpty() { while (isPainting()) { paint(); } }
public void paintToEmpty() { while (hasPaint()) { stop(); } }
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to inherit a class in Java?
implements
extends
inherits
super
Similar Resources on Wayground
10 questions
Sales Marketing (BRANCH SURABAYA)
Quiz
•
12th Grade
10 questions
L'importance du graissage
Quiz
•
12th Grade
10 questions
Un programme : l'accès à une foule d'options pour la suite!
Quiz
•
10th - 12th Grade
10 questions
RC Plans and Pricing
Quiz
•
KG - Professional Dev...
10 questions
public speaking
Quiz
•
12th Grade
10 questions
PUBLIC SERVICE QUIZ
Quiz
•
10th - 12th Grade
10 questions
Analysis of financial statement 2
Quiz
•
12th Grade
10 questions
Let's Have Fun - Ice Breaker
Quiz
•
4th Grade - University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
6 questions
FOREST Self-Discipline
Lesson
•
1st - 5th Grade
7 questions
Veteran's Day
Interactive video
•
3rd Grade
20 questions
Weekly Prefix check #2
Quiz
•
4th - 7th Grade
Discover more resources for Professional Development
8 questions
Veterans Day Quiz
Quiz
•
12th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
19 questions
Explore Triangle Congruence and Proofs
Quiz
•
9th - 12th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
DNA Replication Concepts and Mechanisms
Interactive video
•
7th - 12th Grade
20 questions
Food Chains and Food Webs
Quiz
•
7th - 12th Grade
15 questions
Identify Triangle Congruence Criteria
Quiz
•
9th - 12th Grade
23 questions
Similar Figures
Quiz
•
9th - 12th Grade
