English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board chapter 16 - Inheritance [Latest edition]

Advertisements

Online Mock Tests

Chapters

Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board chapter 16 - Inheritance - Shaalaa.com
Advertisements

Solutions for Chapter 16: Inheritance

Below listed, you can find solutions for Chapter 16 of Tamil Nadu Board of Secondary Education Samacheer Kalvi for Computer Science [English] Class 11 TN Board.


Evaluation - Section - AEvaluation - Section - BEvaluation - Section - CEvaluation - Section - D
Evaluation - Section - A [Pages 272 - 273]

Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board 16 Inheritance Evaluation - Section - A [Pages 272 - 273]

Choose the correct answer

Evaluation - Section - A | Q 1. | Page 272

Which of the following is the process of creating new classes from an existing class?

  • Polymorphism

  • Inheritance

  • Encapsulation

  • superclass

Evaluation - Section - A | Q 2. | Page 272

Which of the following derives a class student from the base class school?

  • school: student

  • class student : public school

  • student : public school

  • class school : public student

Evaluation - Section - A | Q 3. | Page 272

The type of inheritance that reflects the transitive nature is ______

  • Single Inheritance

  • Multiple Inheritance

  • Multilevel Inheritance

  • Hybrid Inheritance

Evaluation - Section - A | Q 4. | Page 272

Which visibility mode should be used when you want the features of the base class to be available to the derived class but not to the classes that are derived from the derived class?

  • Private

  • Public

  • Protected

  • All of these

Evaluation - Section - A | Q 5. | Page 272

Inheritance is a process of creating a new class from ______

  • Base class

  • abstract

  • derived class

  • Function

Evaluation - Section - A | Q 6. | Page 272

A class is derived from a class which is a derived class itself, then this is referred to as ______

  • multiple inheritances

  • multilevel inheritance

  • single inheritance

  • double inheritance

Evaluation - Section - A | Q 7. | Page 272

Which amongst the following is executed in the order of inheritance?

  • Destructor

  • Member function

  • Constructor

  • Object

Evaluation - Section - A | Q 8. | Page 272

Which of the following is true with respect to inheritance?

  • Private members of the base class are inherited to the derived class with private.

  • Private members of the base class are not inherited to the derived class with private accessibility.

  • Public members of a base class are inherited but not visible to the derived class.

  • Protected members of the base class are inherited but not visible to the outside class.

Evaluation - Section - A | Q 9. 9.1. | Page 272

Based on the following class declaration answer the question?

class vehicle
{ int wheels;
public:
void input_data(float,float);
void output_data();
protected:
int passenger;
};
class heavy_vehicle : protected vehicle {
int diesel_petrol;
protected:
    int load;
public:
void read_data(float,float)
void write_data(); };
class bus: private heavy_vehicle {
char Ticket[20];
public:
void fetch_data(char);
void display_data(); };

Which is the base class of the class heavy_vehicle?

  • Bus

  • heavy_vehicle

  • vehicle

  • both (a) and (c)

Evaluation - Section - A | Q 9. 9.2. | Page 273

Based on the following class declaration answer the question?

class vehicle
{ int wheels;
public:
void input_data(float,float);
void output_data();
protected:
int passenger;
};
class heavy_vehicle : protected vehicle {
int diesel_petrol;
protected:
    int load;
public:
void read_data(float,float)
void write_data(); };
class bus: private heavy_vehicle {
char Ticket[20];
public:
void fetch_data(char);
void display_data(); };

The data member can be accessed from the function displaydata().

  • passenger

  • load

  • Ticket

  • All of these

Evaluation - Section - A | Q 9. 9.3. | Page 273

Based on the following class declaration answer the question?

class vehicle
{ int wheels;
public:
void input_data(float,float);
void output_data();
protected:
int passenger;
};
class heavy_vehicle : protected vehicle {
int diesel_petrol;
protected:
    int load;
public:
void read_data(float,float)
void write_data(); };
class bus: private heavy_vehicle {
char Ticket[20];
public:
void fetch_data(char);
void display_data(); };

The member function that can be accessed by an object of bus Class is ______

  • input_data(), output_data()

  • read_data() ,write_data()

  • fetch_data(), display_data()

  • All of these

Evaluation - Section - A | Q 9. 9.4. | Page 273

Based on the following class declaration answer the question?

class vehicle
{ int wheels;
public:
void input_data(float,float);
void output_data();
protected:
int passenger;
};
class heavy_vehicle : protected vehicle {
int diesel_petrol;
protected:
    int load;
public:
void read_data(float,float)
void write_data(); };
class bus: private heavy_vehicle {
char Ticket[20];
public:
void fetch_data(char);
void display_data(); };

The member function is inherited as public by Class Bus ______

  • input_data(), output_data()

  • read_data(), write_data()

  • fetch_data(), display_data()

  • none of these

Evaluation - Section - B [Page 273]

Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board 16 Inheritance Evaluation - Section - B [Page 273]

Very Short Answers

Evaluation - Section - B | Q 1. | Page 273

What is inheritance?

Evaluation - Section - B | Q 2. | Page 273

What is a base class?

Evaluation - Section - B | Q 3. | Page 273

Why derived class is called a power-packed class?

Evaluation - Section - B | Q 4. | Page 273

In what multilevel and multiple inheritances differ though both contain many base classes?

Evaluation - Section - B | Q 5. | Page 273

What is the difference between public and private visibility modes?

Evaluation - Section - C [Page 273]

Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board 16 Inheritance Evaluation - Section - C [Page 273]

Short Answers

Evaluation - Section - C | Q 1. | Page 273

What are the points to be noted while deriving a new class?

Evaluation - Section - C | Q 2. | Page 273

What is the difference between the members present in the private visibility mode and the members present in the public visibility mode?

Evaluation - Section - C | Q 3. | Page 273

What is the difference between polymorphism and inheritance though are used for the reusability of code?

Evaluation - Section - C | Q 4. | Page 273

What do you mean by overriding?

Evaluation - Section - C | Q 5. | Page 273

Write some facts about the execution of constructors and destructors in inheritance?

Evaluation - Section - D [Pages 273 - 274]

Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board 16 Inheritance Evaluation - Section - D [Pages 273 - 274]

Explain in detail

Evaluation - Section - D | Q 1. | Page 273

Explain the different types of inheritance?

Evaluation - Section - D | Q 2. | Page 273

Explain the different visibility modes through pictorial representation?

Evaluation - Section - D | Q 3. 3.1. | Page 273

Consider the following c++ code and answer the question?

class Personal
{
int Class,Rno;
char Section;
protected:
char Name[20];
public:
personal();
void pentry();
void Pdisplay(); };
class Marks:private Personal
{ float M{5};
protected:
char Grade[5];
public: Marks();
void Mentry();
void Mdisplay(); };
class Result:public Marks
{
float Total,Agg;
public:
char FinalGrade, Commence[20];
Result();
void Rcalculate();
void Rdisplay();
};

Which type of Inheritance is shown in the program?

Evaluation - Section - D | Q 3. 3.2. | Page 273

Consider the following c++ code and answer the question?

class Personal
{ int Class,Rno;
char Section;
protected:
char Name[20];
public:
personal();
void pentry();
void Pdisplay(); };
class Marks:private Personal
{ float M{5};
protected:
char Grade[5];
public: Marks();
void Mentry();
void Mdisplay(); };
class Result:public Marks
{
float Total,Agg;
public:
char FinalGrade, Commence[20];
Result();
void Rcalculate();
void Rdisplay();
};

Specify the visibility mode of base classes.

Evaluation - Section - D | Q 3. 3.3. | Page 274

Consider the following c++ code and answer the question?

class Personal
{ int Class,Rno;
char Section;
protected:
char Name[20];
public:
personal();
void pentry();
void Pdisplay(); };
class Marks:private Personal
{ float M{5};
protected:
char Grade[5];
public: Marks();
void Mentry();
void Mdisplay(); };
class Result:public Marks
{
float Total,Agg;
public:
char FinalGrade, Commence[20];
Result();
void Rcalculate();
void Rdisplay();
};

Give the sequence of Constructor/Destructor Invocation when the object of class Result is created.

Evaluation - Section - D | Q 3. 3.4. | Page 274

Consider the following c++ code and answer the question?

class Personal
{ int Class,Rno;
char Section;
protected:
char Name[20];
public:
personal();
void pentry();
void Pdisplay(); };
class Marks:private Personal
{ float M{5};
protected:
char Grade[5];
public: Marks();
void Mentry();
void Mdisplay(); };
class Result:public Marks
{
float Total,Agg;
public:
char FinalGrade, Commence[20];
Result();
void Rcalculate();
void Rdisplay();
};

Name the base class(/es) and derived class (/es).

Evaluation - Section - D | Q 3. 3.5. | Page 274

Consider the following c++ code and answer the question?

class Personal
{ int Class,Rno;
char Section;
protected:
char Name[20];
public:
personal();
void pentry();
void Pdisplay(); };
class Marks:private Personal
{ float M{5};
protected:
char Grade[5];
public: Marks();
void Mentry();
void Mdisplay(); };
class Result:public Marks
{
float Total,Agg;
public:
char FinalGrade, Commence[20];
Result();
void Rcalculate();
void Rdisplay();
};

Give a number of bytes to be occupied by the object of the following class:

(a) Personal
(b) Marks
(c) Result

Evaluation - Section - D | Q 3. 3.6. | Page 274

Consider the following c++ code and answer the question?

class Personal
{ int Class,Rno;
char Section;
protected:
char Name[20];
public:
personal();
void pentry();
void Pdisplay(); };
class Marks:private Personal
{ float M{5};
protected:
char Grade[5];
public: Marks();
void Mentry();
void Mdisplay(); };
class Result:public Marks
{
float Total,Agg;
public:
char FinalGrade, Commence[20];
Result();
void Rcalculate();
void Rdisplay();
};

Write the names of data members accessible from the object of class Result.

Evaluation - Section - D | Q 3. 3.7. | Page 274

Consider the following c++ code and answer the question?

class Personal
{ int Class,Rno;
char Section;
protected:
char Name[20];
public:
personal();
void pentry();
void Pdisplay(); };
class Marks:private Personal
{ float M{5};
protected:
char Grade[5];
public: Marks();
void Mentry();
void Mdisplay(); };
class Result:public Marks
{
float Total,Agg;
public:
char FinalGrade, Commence[20];
Result();
void Rcalculate();
void Rdisplay();
};

Write the names of all member functions accessible from the object of class Result.

Evaluation - Section - D | Q 3. 3.8. | Page 274

Consider the following c++ code and answer the question?

class Personal
{ int Class,Rno;
char Section;
protected:
char Name[20];
public:
personal();
void pentry();
void Pdisplay(); };
class Marks:private Personal
{ float M{5};
protected:
char Grade[5];
public: Marks();
void Mentry();
void Mdisplay(); };
class Result:public Marks
{
float Total,Agg;
public:
char FinalGrade, Commence[20];
Result();
void Rcalculate();
void Rdisplay();
};

Write the names of all members accessible from member functions of class Result.

Evaluation - Section - D | Q 4. | Page 274

Write the output of the following program.

#include<iostream>
using namespace std;
class A
{ protected:
int x;
public:
void show()
{cout<<"x = "<<x<<endl;}
A()
{ cout<<endl<<" I am class A "<<endl;}
~A()
{ cout<<endl<<" Bye ";} };
class B : public A
{protected:
int y;
public:
B(int x1, int y1)
{ x = x1;
y = y1; }
B()
{ cout<<endl<<" I am class B "<<endl; }
~B()
{ cout<<endl<<" Bye "; }
void show()
{ cout<<"x = "<<x<<endl;
cout<<"y = "<<y<<endl; } };
int main()
{A objA;
B objB(30, 20);
objB.show();
return 0; }

Evaluation - Section - D | Q 5. | Page 274

Debug the following program.

%include(iostream.h)
#include<conio.h>
class A()
{ public;
int a1,a2:a3;
void getdata[]
{ a1=15; a2=13; a3=13; } }
class B:: public A()
{ PUBLIC
voidfunc()
{ int b1:b2:b3;
A::getdata[];
b1=a1;
b2=a2;
a3=a3;
cout<<b1<<’\t’<<b2<<’t\’<<b3; }
void main()
{ B der;
der1:func(); }

Solutions for 16: Inheritance

Evaluation - Section - AEvaluation - Section - BEvaluation - Section - CEvaluation - Section - D
Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board chapter 16 - Inheritance - Shaalaa.com

Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board chapter 16 - Inheritance

Shaalaa.com has the Tamil Nadu Board of Secondary Education Mathematics Computer Science [English] Class 11 TN Board Tamil Nadu Board of Secondary Education solutions in a manner that help students grasp basic concepts better and faster. The detailed, step-by-step solutions will help you understand the concepts better and clarify any confusion. Samacheer Kalvi solutions for Mathematics Computer Science [English] Class 11 TN Board Tamil Nadu Board of Secondary Education 16 (Inheritance) include all questions with answers and detailed explanations. This will clear students' doubts about questions and improve their application skills while preparing for board exams.

Further, we at Shaalaa.com provide such solutions so students can prepare for written exams. Samacheer Kalvi textbook solutions can be a core help for self-study and provide excellent self-help guidance for students.

Concepts covered in Computer Science [English] Class 11 TN Board chapter 16 Inheritance are Inheritance, Need for Inheritance, Derived Class and Base Class, Visibility Modes, Overriding / Shadowing Base Class Functions in Derived Class, Inheritance.

Using Samacheer Kalvi Computer Science [English] Class 11 TN Board solutions Inheritance exercise by students is an easy way to prepare for the exams, as they involve solutions arranged chapter-wise and also page-wise. The questions involved in Samacheer Kalvi Solutions are essential questions that can be asked in the final exam. Maximum Tamil Nadu Board of Secondary Education Computer Science [English] Class 11 TN Board students prefer Samacheer Kalvi Textbook Solutions to score more in exams.

Get the free view of Chapter 16, Inheritance Computer Science [English] Class 11 TN Board additional questions for Mathematics Computer Science [English] Class 11 TN Board Tamil Nadu Board of Secondary Education, and you can use Shaalaa.com to keep it handy for your exam preparation.

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×