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
Image Representation Lesson 2
Quiz
•
9th Grade
10 questions
python
Quiz
•
10th Grade
10 questions
DTJSQuiz
Quiz
•
11th Grade
10 questions
GCSE Computing: 2.2 Data Structures #1
Quiz
•
10th - 11th Grade
10 questions
Treasure Hunt
Quiz
•
12th Grade
11 questions
Creative iMedia: Strengths, Weaknesses and Improvements
Quiz
•
10th Grade
10 questions
SC025: Control Structures Lecture Quiz
Quiz
•
12th Grade
10 questions
Actuators
Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
MINERS Core Values Quiz
Quiz
•
8th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
