Class 12 Computer Science · Chapter 3 · Test 3
Inheritance
38 MCQs
38 questions · 30 min · 38 marks
Want to try first? Take the free Computer Science test: Networks Basics
Sample questions
The first 5 of 38. Try each one, then tap to see the answer.
Question 1
Inheritance in OOP means:
- AReusing and extending functionality from a parent class to a child class
- BHiding data in a class
- CCreating multiple instances of the same class
- DManaging behaviour of classes
Show answerHide answer
Answer: A
Inheritance lets a child class reuse and extend what a parent class provides.
Question 2
An example of inheritance in Python is:
- ACreating two classes with similar attributes
- BA child class inheriting attributes and methods from a parent class
- CUsing private variables within a class
- DModifying a method inside the same class
Show answerHide answer
Answer: B
Inheritance means a child class takes attributes and methods from a parent class.
Question 3
Inheritance allows a class to:
- AHide its data only
- BInherit attributes and methods from another class
- CDefine multiple functions only
- DCreate objects without a class
Show answerHide answer
Answer: B
A class can inherit attributes and methods from another class.
Question 4
The class that inherits from another class is called a:
- ASuperclass
- BBase class
- CSubclass
- DModule
Show answerHide answer
Answer: C
The inheriting class is called a subclass.
Question 5
The parent class is also known as the:
- ASubclass
- BBase class
- CDerived class
- DChild class
Show answerHide answer
Answer: B
The parent class is the base class or superclass.
More tests in Object Oriented Programming Using Python
Practise with a free account
Save your scores, see which chapters need work, and keep a notebook of every question you got wrong.