
Inheritance in Object-Oriented Programming
Authored by Justine Nichol Pasamonte
Other
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
A software development team wants to reuse code across different vehicle types such as Car, Bus, and Motorcycle. They all share features like move() and brake() from a Vehicle class. Which inheritance type should they implement to maximize code reuse?
Single Inheritance
Multilevel Inheritance
Hierarchical Inheritance
Multiple Inheritance
2.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
A developer has a base class Employee and a derived class Manager. They need to access a private member salary of Employee from Manager. Which of the following should they implement?
Directly call the private variable using object reference
Redefine salary in the derived class
Use a getter function defined in the base class
Make the derived class static
3.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
You are working on a student management system. The base class is Person, and the derived classes are Teacher and Student. Which inheritance type best fits this design?
Hybrid Inheritance
Multiple Inheritance
Hierarchical Inheritance
Multilevel Inheritance
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
In a hybrid inheritance setup, you encounter ambiguity accessing a function from the common base class through two different base classes. Which issue are you facing?
Access Violation Error
Segmentation Fault
Diamond Problem
Type Casting Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
A developer uses private inheritance for a class Logger inherited by Application. What is the access level of the public members of Logger inside Application?
Public
Protected
Private
Inaccessible
6.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
A company has a class structure where CEO inherits from Manager, and Manager inherits from Employee. Which type of inheritance does this represent?
Single
Multiple
Multilevel
Hierarchical
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
A base class Shape has a method draw(). Two derived classes Circle and Square override this method. What OOP concept does this illustrate?
Abstraction
Tight Coupling
Polymorphism
Hybrid Inheritance
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
20 questions
La voz: Instrumento Base
Quiz
•
University
11 questions
Ant science
Quiz
•
5th Grade - University
20 questions
MIS Chapter 4
Quiz
•
University
10 questions
7BUSS007C - 1
Quiz
•
University
11 questions
Drug For Anti-Hypertension
Quiz
•
University
10 questions
indirect taxes
Quiz
•
University
20 questions
NMMS MAT 7காலம் சார்ந்த கணக்குகள்
Quiz
•
University
15 questions
PLANE TABLE SURVEYING
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Other
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University