
Java Inheritance and Method Quiz

Quiz
•
Professional Development
•
12th Grade
•
Medium
COY DUANE WEBB
Used 14+ times
FREE Resource
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
Capacitacion Ventas TYC

Quiz
•
1st - 12th Grade
12 questions
Produits avec garantie / sans garantie

Quiz
•
1st Grade - Professio...
12 questions
HACCP ADR

Quiz
•
1st - 12th Grade
7 questions
MeetUP - Sopra Steria

Quiz
•
1st - 12th Grade
10 questions
Tekstbron 3.4, 3.5 en 3.6

Quiz
•
6th - 12th Grade
10 questions
Budżet

Quiz
•
9th - 12th Grade
12 questions
Renovero

Quiz
•
1st - 12th Grade
8 questions
Design of Bridges

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Professional Development
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
6 questions
Rule of Law

Quiz
•
6th - 12th Grade
15 questions
ACT Math Practice Test

Quiz
•
9th - 12th Grade
18 questions
Hispanic Heritage Month

Quiz
•
KG - 12th Grade
28 questions
Ser vs estar

Quiz
•
9th - 12th Grade
10 questions
Would you rather...

Quiz
•
KG - University
13 questions
BizInnovator Startup - Experience and Overview

Quiz
•
9th - 12th Grade