Read and download the CBSE Class 12 Computer Science Inheritance Extending Classes Worksheet in PDF format. We have provided exhaustive and printable Class 12 Computer Science worksheets for Inheritance Extending Classes, designed by expert teachers. These resources align with the 2025-26 syllabus and examination patterns issued by NCERT, CBSE, and KVS, helping students master all important chapter topics.
Chapter-wise Worksheet for Class 12 Computer Science Inheritance Extending Classes
Students of Class 12 should use this Computer Science practice paper to check their understanding of Inheritance Extending Classes as it includes essential problems and detailed solutions. Regular self-testing with these will help you achieve higher marks in your school tests and final examinations.
Class 12 Computer Science Inheritance Extending Classes Worksheet with Answers
Inheritance
Inheritance is the process of creating a new class from existing class/classes. The existing class is known as the base/super/parent class and newly created class is known as derived/sub/child class. The derived class will inherits the properties of base class. Advantages of Inheritance are given below:
Reusability: It helps the code to be reused in derived class. The base class is defined and once it is compiled, it needs not to be reworked.
Transitivity: If class B inherits properties of another class A, then all subclasses of class B will automatically inherits the properties of A. It is called transitive property.
Types of Inheritance:
1. Single inheritance:- When a sub class inherits only from one base class, is known as single inheritance.
2. Multiple Inheritance:- When a sub class inherits from multiple base classes, is known as multiple inheritance.
3. Hierarchical Inheritance:- When many sub classes inherit from a single class, it is known as hierarchical inheritance.
4. Multilevel Inheritance:-When a class inherit from a class that itself inherits from another class it is known as a multilevel inheritance.
5. Hybrid Inheritance: It is a combination of 2 or more of above types of inheritance. There is no pattern of deriving from classes.
Q1. What is Inheritance ?
Answer . It is a special feature of OOPS. Inheritance is capability to inherit the properties of one class in to another class.
The derive new class is called derived class (sub class) and old class is called based class (super class).
The Class whose properties of data members are inherited, is called Base Class or Super Class and the class that inherits these properties, is called Derived Class or Sub Class.
Exp1:- If Class A inherits the data of Class B then we can say A is Sub Class and B is super class.
5. Hybrid Inheritance
It is combination of two or more forms of inheritance.
Q2. What do you mean by Base and Derived Class ?
Answer . A derived class (or sub class) has to identify the class from which it is derived i.e. its base class (or super class)
class derived-class-name : visibility-mode base-class-name
{
members of derived class;
};
class is a key word and visibility mode is a access speicifier (i.e. public, private or protected), : (colon) is used separation
colon (:) indicates derived class (sub class) is based on base class( super class)
Example
class car : public automobile
{
members
};
Q3. What is Multiple Inheritance ?
Answer . Multiple Inheritance means deriving a class from more than one base class.
Class kvschool
{
int rollno1;
void num1();
Public:
{
float kvroll;
void num2();
};
class kvstud
{
int rollno2
void num3();
Protected:
float kvroll1;
void num4();
};
class kvclass : public kvschool, public kvstud
{
int kvroll2;
protected:
void display();
};
// to complete the program deifine display () – in class kvclass
i.e. kvclass ::display()
Q4. Define the needs and objectives of Inheritance.
Answer . The major needs and objectives of inheritance are:
(i) It ensures the closeness with the real world models.
(ii) It extend the functionality of an existing class.
(iii) It establishes “a kind of” relationship.
(iv) It helps in reuse of an existing class by a subclass (reusability).
(v) It implements transitive nature( if a class Y inherits properties from class X, then all subclassY will automatically inherit the properties of X)
(vi) The redundancy can be reduced by abstracting a super class from few sub classes.
(vii) It is conept of reusability.
Q5. Give the following definitions, answer the questions that follow:-
#include <iostream.h>
class book
{
char title[20];
char author[20];
int noof pages;
public:
void read();
void show();
};
class textbook: private textbook
{
int noofchapters, noof assignments;
protected:
int standard;
void readtextbook();
void showtextbook();
};
class physicsbook: public textbook
{
char topic[20];
public:
void readphysicsbook();
void showphysicsbook();
};
(i) Name the members, which can be accessed from the member functions of class physicsbook.
(ii) Name the members, which can be accessed by an object of Class textbook.
(iii) Name the members, which can be accessed by an object of Class physicsbook.
(iv) What will be the size of an object (in bytes) of class physicsbook.
Answer . (i) standard , readtextbook(),showtextbook() and topic;
(ii) readtextbook() and showtextbook()
(iii) readphysicsbook(), showphysicsbook(), readtextbook() and showtextbook()
(iv) The size of object of physicsbook= size of book + size of Textbook + size of physicsbook.
= 42+6+20 = 68 bytes
Q6. Consider the following declarations and answer the questions given below:
Class vehicle
{
int wheels;
protected:
int passenger;
public:
void inputdata( int, int);
void outputdata();
};
class heavyvehicle: protected vehicle
{
int dieselpetrol;
protected:
int load;
public:
void readdata( int, int);
void writedata();
};
class bus:private heavyvehicle
{
char marks[20];
public:
void fetchdata(char);
void displaydata();
};
(i) Name the class and derived class of the class heavyvehicle.
(ii) Name the data members that can be accessed from function displaydata()
(iii) Name the data members that can be accessed by an object of bus class
(iv) Is the member function outputdata() accessible to the objects of heavyvehicle class.
Answer .(i) base class = vehicle, derived class = bus
(ii) The data members passenger, load, make are available to function display data
(iii) No data members can be accessed by the object of bus calss.
(iv) No member functions outputdata () is not accessible to the objects of heavy vehicle class.
Q7 . What type of C++ class members ( data members and member functions) are not inherited?
Answer . Data member : Static data members of the base class are not inherited by the derived class
Member functions: Constructors and destructors of base class are not inherited
| CBSE Class 12 Computer Science Revision Worksheet Set A |
| CBSE Class 12 Computer Science Revision Worksheet Set B |
| CBSE Class 12 Computer Science Revision Worksheet Set C |
| CBSE Class 12 Computer Science Boolean Algebra Worksheet Set A |
| CBSE Class 12 Computer Science Boolean Algebra Worksheet Set B |
| CBSE Class 12 Computers Boolean Algebra Worksheet |
| CBSE Class 12 Computer Science C++ Programming Worksheet |
| CBSE Class 12 Computer Science Case Study Based Questions |
| CBSE Class 12 Computer Science Class And Objects Worksheet Set A |
| CBSE Class 12 Computer Science Class And Objects Worksheet Set B |
| CBSE Class 12 Computers Classes And Objects Worksheet |
| CBSE Class 12 Computer Science Classes Objects Constructors And Destructors Worksheet |
| CBSE Class 12 Computer Science Communication And Network Concepts Worksheet |
| CBSE Class 12 Computer Science Computer Networking Worksheet |
| CBSE Class 12 Computer Science Constructors And Destructors Worksheet |
| CBSE Class 12 Computers Constructors And Destructors Worksheet |
| CBSE Class 12 Computer Science Data File Handling Worksheet |
| CBSE Class 12 Computers Data Structures Worksheet |
| CBSE Class 12 Computer Science Database Concepts And Sql Worksheet |
| CBSE Class 12 Computer Science Dbms And Structured Query Language Worksheet |
| CBSE Class 12 Computer Science Flow Of Control Worksheet |
| CBSE Class 12 Computer Science Function And Structures Worksheet |
| CBSE Class 12 Computer Science Function Overloading Worksheet |
| CBSE Class 12 Computer Science Fundamentals Of Computer Worksheet |
| CBSE Class 12 Computer Science Inheritance Extending Classes Worksheet |
| CBSE Class 12 Computer Science Linked Lists Stacks And Queues Worksheet |
| CBSE Class 12 Computer Science Network And Communication Technology Worksheet |
| CBSE Class 12 Computer Science Object Oriented Programming Worksheet |
| CBSE Class 12 Computers Object Oriented Programming Worksheet |
| CBSE Class 12 Computer Science Object Oriented Programming In C++ Worksheet |
| CBSE Class 12 Computer Science Oop Classes And Objects Worksheet |
| CBSE Class 12 Computer Science Programming In C++ Worksheet |
| CBSE Class 12 Computer Science SQL Worksheet Set A |
| CBSE Class 12 Computer Science SQL Worksheet Set B |
| CBSE Class 12 Computer Science Stacks Queues And Linked List Worksheet |
Important Practice Resources for Class 12 Computer Science
CBSE Computer Science Class 12 Inheritance Extending Classes Worksheet
Students can use the practice questions and answers provided above for Inheritance Extending Classes to prepare for their upcoming school tests. This resource is designed by expert teachers as per the latest 2026 syllabus released by CBSE for Class 12. We suggest that Class 12 students solve these questions daily for a strong foundation in Computer Science.
Inheritance Extending Classes Solutions & NCERT Alignment
Our expert teachers have referred to the latest NCERT book for Class 12 Computer Science to create these exercises. After solving the questions you should compare your answers with our detailed solutions as they have been designed by expert teachers. You will understand the correct way to write answers for the CBSE exams. You can also see above MCQ questions for Computer Science to cover every important topic in the chapter.
Class 12 Exam Preparation Strategy
Regular practice of this Class 12 Computer Science study material helps you to be familiar with the most regularly asked exam topics. If you find any topic in Inheritance Extending Classes difficult then you can refer to our NCERT solutions for Class 12 Computer Science. All revision sheets and printable assignments on studiestoday.com are free and updated to help students get better scores in their school examinations.
You can download the CBSE Printable worksheets for Class 12 Computer Science Inheritance Extending Classes for latest session from StudiesToday.com
There is no charge for the Printable worksheets for Class 12 CBSE Computer Science Inheritance Extending Classes you can download everything free
Yes, studiestoday.com provides all latest NCERT Inheritance Extending Classes Class 12 Computer Science test sheets with answers based on the latest books for the current academic session
CBSE Class 12 Computer Science Inheritance Extending Classes worksheets cover all topics as per the latest syllabus for current academic year.
Regular practice with Class 12 Computer Science worksheets can help you understand all concepts better, you can identify weak areas, and improve your speed and accuracy.
