Which of the following statements about inheritance in Java is/are true?
Inheritance Quiz

Quiz
•
Education
•
University
•
Medium
Rose Malaborbor
Used 1+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
1 min • 3 pts
Inheritance allows a subclass to inherit fields and methods from its superclass.
Java supports multiple inheritance.
The keyword "extends" is used to indicate that a class is a subclass of another class.
Constructors are not inherited from the superclass.
2.
MULTIPLE CHOICE QUESTION
1 min • 3 pts
A car dealership needs a program to store information about the cars for sale. For each car, they want to keep track of the following information: number of doors (2 or 4), whether the car has air conditioning, and its average number of miles per gallon. Which of the following is the best design?
Use four unrelated classes: Car, Doors, AirConditioning, and MilesPerGallon.
Use classes: Doors, AirConditioning, and MilesPerGallon, each with a subclass Car.
Use a class Car, with fields: numDoors, hasAir, and milesPerGallon.
Use a class Car, with superclasses of Doors, AirConditioning, and MilesPerGallon.
3.
MULTIPLE CHOICE QUESTION
3 mins • 3 pts
A bookstore is working on an on-line ordering system. For each type of published material (books, movies, audio tapes) they need to track the id, title, author(s), date published, and price. Which of the following would be the best design?
Create one class PublishedMaterial with the requested fields plus type.
Create classes Book, Movie, and AudioTape with the requested fields.
Create one class BookStore with the requested fields plus type.
Create the class PublishedMaterial with child classes of Book, Movie, and AudioTape.
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
In a Multi-Level Inheritance in Java, the last subclass inherits methods and properties of ____.
Only one immediate Superclass
Few classes above it.
All classes above it
None of the choices
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Which of the following is an example of hierarchical inheritance in Java?
A Car class that inherits from a Vehicle class, and a Truck class that inherits from the Car class.
A Circle class that inherits from a Shape class, and a Shape class that inherits from the Rectangle class.
A Person class that inherits from a Student class, and a Teacher class that inherits from the Person class.
A Dog class that inherits from an Animal class, and a Cat class that also inherits from the Animal class.
Similar Resources on Quizizz
9 questions
PASSIVE VOICE

Quiz
•
University
8 questions
4.3 SAFETY EXITS

Quiz
•
University
10 questions
ESU COE OPEN HOUSE

Quiz
•
University
8 questions
Critical Thinking Poll

Quiz
•
University
10 questions
High School vs. College

Quiz
•
University
10 questions
Gateway to Success Module 2 College Calendar Policies Quiz

Quiz
•
University
10 questions
Pronouns

Quiz
•
8th Grade - University
10 questions
Definite and indefinite article

Quiz
•
University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade