OOP2 Understanding Inheritance in OOP

Quiz
•
Computers
•
11th Grade
•
Medium

Amanda Beacham
Used 13+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is inheritance in object-oriented programming?
A mechanism to create private attributes
A way to reuse code by creating a new class from an existing class
A method to delete attributes from a class
A process to convert a class into a function
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the context of the provided example, what is the superclass of the `Employee` class?
LightBulb
Person
SalariedEmployee
HourlyPaidEmployee
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a derived class in the given example?
Person
Employee
LightBulb
Method
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of overriding a method in a subclass?
To delete the method from the superclass
To provide a more specific implementation of a method in the subclass
To create a new class
To change the class name
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you call a method from the superclass if it has been overridden in the subclass?
By using the `super` keyword
By renaming the method
By deleting the subclass method
By using the `override` keyword
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the example, what additional attribute does the `Employee` class have compared to the `Person` class?
Date of Birth
National Insurance Number
Salary
Job Title
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the relationship between `SalariedEmployee` and `Employee` in the example?
`SalariedEmployee` is a superclass of `Employee`
`SalariedEmployee` is a subclass of `Employee`
They are unrelated
They are the same class
Create a free account and access millions of resources
Similar Resources on Wayground
9 questions
#129 Creating a Scanner Object

Quiz
•
11th Grade
10 questions
Pemrograman berorientasi objek

Quiz
•
11th Grade
9 questions
ujian harian 1

Quiz
•
11th Grade
10 questions
Business Essentials Review

Quiz
•
9th - 12th Grade
10 questions
Dictionary in Python

Quiz
•
11th - 12th Grade
10 questions
Java

Quiz
•
11th Grade
10 questions
OOP 4 Polymorphism

Quiz
•
11th Grade
12 questions
Codehs

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade