Consider classes Manager and Employee. Which should be the superclass and which should be the subclass?
AP CSA - Inheritance, plus one while loop.

Quiz
•
Computers
•
12th Grade
•
Medium
Susan Moore
Used 12+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Manager is the superclass.
Employee is the subclass.
Employee is the superclass.
Manager is the subclass.
Neither. Inheritance is not appropriate in this case.
Answer explanation
Because every manager is an employee but not the other way around, the Manager class is more specialized. It is the subclass, and the Employee is the superclass.
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Which of the following classes BankAccount, CheckingAccount and SavingsAccount would be the superclass?
Answer explanation
CheckingAccount and SavingsAccount both inherit from the more general class BankAccount.
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Consider the method doSomething(Car c). Select all vehicle classes from Figure 1 whose objects cannot be passed to this method.
SUV
Vehicle
Truck
Motorcycle
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Should a class Quiz inherit from the class Question?
Yes
No
Answer explanation
A Quiz class should not inherit from the class Question. A quiz isn't a question. it has questions.
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following correctly instantiates a new Painter object?
Painter kahlo = new Painter;
Painter kahlo = Painter();
kahlo Painter = new Painter();
Painter kahlo = new Painter();
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the code segment.
What is the name of the superclass?
Painter
PainterPlus
turnAround
SuperPainter
Answer explanation
The name of the superclass is indicated after the extends keyword. In this example, the superclass is Painter
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Fill in the blank. Inheritance represents a/an ___ relationship.
is-many
has-a
is-a
none of these
Answer explanation
Inheritance represents an is-a relationship. For example, Dog is a Pet.
Create a free account and access millions of resources
Similar Resources on Quizizz
5 questions
AP CSA Unit Review #2

Quiz
•
9th - 12th Grade
5 questions
Java Inheritance

Quiz
•
9th - 12th Grade
8 questions
Unit 9 Quiz 1 Review

Quiz
•
9th - 12th Grade
5 questions
Four pillars of Object-Oriented Programming (OOP) in java

Quiz
•
9th - 12th Grade
7 questions
What Do You Remember About Inheritance

Quiz
•
9th - 12th Grade
10 questions
Introduction to Java

Quiz
•
8th - 12th Grade
7 questions
CodeHS 4.12 Inheritance

Quiz
•
9th - 12th Grade
6 questions
Review of inheritance & polymorphism

Quiz
•
12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University