CodeHS 4.14 Polymorphism
Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Aaron Pavao
Used 21+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Given this hierarchy of classes, which of these declarations are illegal?
Check all that apply.
Shape foo = new Rectangle();
Shape bar = new Square();
Rectangle zim = new Square();
Ellipse dib = new Shape();
Ellipse gaz = new Circle();
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is late binding?
The proper method is called at run-time
The proper method is called at compile time
The class is assigned a superclass
A variable type is cast to another type
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Assuming Rectangle and Square are both concrete classes, which version of getArea() will be executed at run-time?
The version in Shape
The version in Rectangle
The version in Square
Trick question: there will be a compiler error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Assuming Square is a subclass of Rectangle which is a subclass of Shape and all are concrete classes, which version of getArea() will be executed at run-time?
The version in Shape
The version in Rectangle
The version in Square
Trick question: there will be a compiler error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a hierarchy?
Any group of objects ranked so that every one but the topmost is subordinate to a specified one above it
A level or rank in an organization
The bourgeoisie
The person or organization in charge
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When class Bar is based on class Foo, what do we call Foo?
subclass
superclass
extends
super
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does it mean to override a superclass method?
A method in the subclass has the same signature as one in the superclass, and the subclass method is used
A method in the subclass has the same signature as one in the superclass, and the superclass method is used
An instance variable in the subclass has the same signature as one in the superclass, and the subclass instance variable is used
A instance variable in the subclass has the same signature as one in the superclass, and the superclass instance variable is used
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
AI and Python: Ch.1 Revision
Quiz
•
9th Grade
14 questions
Computing figures
Quiz
•
4th - 12th Grade
15 questions
End of term assessment
Quiz
•
9th Grade
10 questions
Keyboarding Terms
Quiz
•
9th - 12th Grade
10 questions
Year 9 - Computing - Networking - Transmission Media
Quiz
•
9th Grade
15 questions
Tekper Bab3
Quiz
•
10th Grade
11 questions
Kuiz ASK T3 - BAHAGIAN B SET 1
Quiz
•
9th Grade
10 questions
Grade 11 Term 4 Practice 2
Quiz
•
11th Grade
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
