CBSE Class 12 Computer Science Inheritance Worksheet Set 02

Class 12 Computer Science Practice Set: Inheritance

Access printable practice worksheets for Inheritance designed to align with the 2026-27 academic syllabus for Class 12 Computer Science. These structured exercises help students evaluate their conceptual understanding and improve exam readiness.

Download Inheritance Worksheet PDF

Access the complete worksheet PDF for Inheritance below. Regular practice with these targeted questions builds familiarity with standard exam patterns and helps secure higher marks in final Computer Science evaluations.

INHERITANCE
 
1. Imagine a publishing company that markets both books and audio-cassette versions of its works. Create a class publication that stores the title (a string) and price (type float) of a publication. From this class, derive two class: book, which adds a page count (type int) and tape, which adds a playing time in minutes (type float). Each of these three classes should have a getdata() function to get its data from the user at the keyboard, and a putdata() function to display its data. Write a main() program to test the book and tape classes by creating instances of them, asking the user to fill in their data with getdata(), and then displaying the data with putdata().
 
2. (i) Define a class STUDENT with the following specifications:-
Private Members: Name of type string , RollNo of type unsigned int Protected Members: Class of type unsigned int Public Members: Constructor to assign initial values of Name with “Not Assigned”, RollNo & Class with 0.
 
A function Input() to input the values all data members
A function Display() to Display the contents of all data members.
(ii) Define another class TEST which is publicly derived from class STUDENT with the following specifications:-
 
Private Members: English , Maths, Physics , Chemistry , ComputerScience of type float A function Calculate_Total() to calculate TotalMarks
Protected Members: TotalMarks of type float Public Members: Constructor to assign initial values of all data members with 0. A function getData() to input the values all data members & call Calculate_Total() A function displayData() to display the contents of all data members.
 
(iii) Define one more class RESULT which is publicly derived from class TEST with the following specifications:-
Private Members: Percentage of type float , Grade of type string
Public Members: Constructor to assign initial values of percentage with 0 and grade with ‘E’ A function calcPercentage() & A function calcGrade() according to the following criteria:
 
%age of Marks     Grade
>= 90                    A
>= 75 and <90       B
>= 60 and <75       C
>= 40 and <60       D
< 40                       E
 
A function displayResult() to display the values of percentage and grade. Now, write the main function to :
 
Create an object of class RESULT : To obtain all the values required to display the result of a student. Display the result with all the details


Please click on below link to download CBSE Class 12 Computer Science Inheritance Worksheet Set B

Exam Preparation Worksheet for Class 12 Computer Science Inheritance

Inheritance Printable Worksheet for Class 12 Computer Science

Access structured practice worksheets for Inheritance designed in alignment with the latest CBSE curriculum for Class 12 Computer Science. These printable problem sets help students build accuracy and prepare effectively for school tests.

How to Use These Practice Sheets

Built using the official NCERT book for Class 12 Computer Science, these practice materials provide reliable academic guidance. Pair your practice with our recommended NCERT solutions to master optimal problem-solving approaches.

Enhance Speed with Online Practice

Follow up your worksheet practice by attempting the interactive online Computer Science MCQ test for this chapter to evaluate your execution speed. All platform resources are free to access.

FAQs

Where can I download the latest PDF for CBSE Class 12 Computer Science Inheritance Worksheet Set 02?

You can download the teacher-verified PDF for CBSE Class 12 Computer Science Inheritance Worksheet Set 02 from StudiesToday.com. These practice sheets for Class 12 Computer Science are designed as per the latest CBSE academic session.

Are these Computer Science Class 12 worksheets based on the 2026-27 competency-based pattern?

Yes, our CBSE Class 12 Computer Science Inheritance Worksheet Set 02 includes a variety of questions like Case-based studies, Assertion-Reasoning, and MCQs as per the 50% competency-based weightage in the latest curriculum for Class 12.

Do you provide solved answers for CBSE Class 12 Computer Science Inheritance Worksheet Set 02?

Yes, we have provided detailed solutions for CBSE Class 12 Computer Science Inheritance Worksheet Set 02 to help Class 12 and follow the official CBSE marking scheme.

How does solving CBSE Class 12 Computer Science Inheritance Worksheet Set 02 help in exam preparation?

Daily practice with these Computer Science worksheets helps in identifying understanding gaps. It also improves question solving speed and ensures that Class 12 students get more marks in CBSE exams.

Is there any charge for the Class 12 Computer Science practice test papers?

All our Class 12 Computer Science practice test papers and worksheets are available for free download in mobile-friendly PDF format. You can access CBSE Class 12 Computer Science Inheritance Worksheet Set 02 without any registration.