Inheritance in Object-Oriented Programming

Inheritance in Object-Oriented Programming

University

15 Qs

quiz-placeholder

Similar activities

Level 2 Health & Safety - Using access equipment

Level 2 Health & Safety - Using access equipment

12th Grade - University

12 Qs

FM Exam 1 Review - Original Kahoot

FM Exam 1 Review - Original Kahoot

University

20 Qs

Lecture 4 : Roads and Pavings

Lecture 4 : Roads and Pavings

University

10 Qs

Object Oriented Programming Quizz

Object Oriented Programming Quizz

University

10 Qs

Quiz 1 - Pemrograman Berbasis Obyek

Quiz 1 - Pemrograman Berbasis Obyek

University

17 Qs

BDS Biochem Quiz - Sept 1

BDS Biochem Quiz - Sept 1

University

10 Qs

Object Oriented Programming Language Quiz 3

Object Oriented Programming Language Quiz 3

University

15 Qs

Cheng 111 - Chap 1

Cheng 111 - Chap 1

University

13 Qs

Inheritance in Object-Oriented Programming

Inheritance in Object-Oriented Programming

Assessment

Quiz

Other

University

Medium

Created by

Justine Nichol Pasamonte

Used 2+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?