English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board chapter 14 - Classes and objects [Latest edition]

Advertisements

Chapters

Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board chapter 14 - Classes and objects - Shaalaa.com
Advertisements

Solutions for Chapter 14: Classes and objects

Below listed, you can find solutions for Chapter 14 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 246 - 247]

Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board 14 Classes and objects Evaluation - Section – A [Pages 246 - 247]

Choose the correct answer

Evaluation - Section – A | Q 1. | Page 246

The variables declared inside the class are known as ______.

  • data

  • inline

  • method

  • attributes

Evaluation - Section – A | Q 2. | Page 246

Which of the following statements about member functions are True or False?

i) A member function can call another member function directly by using the dot operator.

ii) Member function can access the private data of the class.

  • i)True, ii)True

  • i)False, ii)True

  • i)True, ii)False

  • i)False, ii)False

Evaluation - Section – A | Q 3. | Page 246

A member function can call another member function directly, without using the dot operator called as ______

  • sub-function

  • sub-member

  • nesting of member function

  • sibling of member function

Evaluation - Section – A | Q 4. | Page 246

The member function defined within the class behaves like ______ functions.

  • inline

  • Noninline

  • Outline

  • Data

Evaluation - Section – A | Q 5. | Page 246

Which of the following access specifier protects data from inadvertent modifications?

  • Private

  • Protected

  • Public

  • Global

Evaluation - Section – A | Q 6. | Page 246

class x
{
   int y;
   public:
   x(int z){y=z;} } x1[4];
int main()
{ x x2(10);
return 0;}

How many objects are created for the above program?

  • 10

  • 14

  • 5

  • 2

Evaluation - Section – A | Q 7. | Page 246

State whether the following statements about the constructor are True or False.

i) constructors should be declared in the private section.

ii) constructors are invoked automatically when the objects are created.

  • True, True

  • True, False

  • False, True

  • False, False

Evaluation - Section – A | Q 8. | Page 247

Which of the following constructor is executed for the following prototype?
add display( add &);     // add is a class name

  • Default constructor

  • Parameterized constructor

  • Copy constructor

  • Non-Parameterized constructor

Evaluation - Section - B [Page 247]

Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board 14 Classes and objects Evaluation - Section - B [Page 247]

Very Short Answers

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

What are called members?

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

Differentiate structure and class though both are user-defined data types.

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

What is the difference between the class and object in terms of oop?

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

Why it is considered good practice to define a constructor though a compiler can automatically generate a constructor?

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

Write down the importance of the destructor.

Evaluation - Section - C [Page 247]

Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board 14 Classes and objects Evaluation - Section - C [Page 247]

Short Answers

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

Rewrite the following program after removing the syntax errors if any and underline the errors:

#include<iostream>
$include<stdio>
class mystud
{ int studid =1001;
char name[20];
public
mystud( ) { }
void register ( )
{cin>>stdid; gets(name); }
void display ( )
{cout<<studid<<”: “<<name<<endl;}
}
int main( ) { mystud MS; register.MS( ); MS.display( ); }
int main( )
{ mystud MS;
register.MS( );
MS.display( );
}

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

Write with example how will you dynamically initialize objects?

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

What are the advantages of declaring constructors and destructors under public accessibility?

Evaluation - Section - C | Q 4. (i) | Page 247

Given the following C++ code, answer the following question.

class TestMeOut
{
public:
~TestMeOut() //Function 1
{cout<<“Leaving the exam hall”<<endl;} TestMeOut() //Function 2
{cout<<“Appearing for exam”<<endl;}
void MyWork() //Function 3
{cout<<“Answering”<<endl;} };

In Object-Oriented Programming, what is Function 1 referred to, and when does it get invoked/called?

Evaluation - Section - C | Q 4. (ii) | Page 247

Given the following C++ code, answer the following question.

class TestMeOut
{
public:
~TestMeOut() //Function 1
{cout<<“Leaving the exam hall”<<endl;} TestMeOut() //Function 2
{cout<<“Appearing for exam”<<endl;}
void MyWork() //Function 3
{cout<<“Answering”<<endl;} };

In Object-Oriented Programming, what is Function 2 referred to as, and when does it get invoked/called?

Evaluation - Section - D [Pages 247 - 248]

Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board 14 Classes and objects Evaluation - Section - D [Pages 247 - 248]

Explain in detail

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

Mention the differences between constructor and destructor.

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

Define a class RESORT with the following description in C++ :

Private members:
Rno // Data member to storeroom number
Name //Data member to store user name
Charges //Data member to store per day charge Days //Data member to store the number of days Compute( )/*A function to calculate a total amount as Days * Charges and if the total amount exceeds 11000 then the total amount is 1.02 * Days *Charges */
Public member:
GetInfo( ) /* Function to Read the information like name , room no, charges and days*/
DispInfo( )/* Function to display all entered details and total amount calculated using COMPUTE function*/

Evaluation - Section - D | Q 3. | Page 248

Write the output of the following

#include<iostream>
using namespace std;
class student
{
  int rno, marks;
  public: student(int r, int m)
  {
    cout << "Constructor " << endl;
    rno = r;
    marks = m;
  }
  void printdet()
  {
    marks = marks + 30;
    cout << "Name: Bharathi" << endl;
    cout << "Roll no : "<<rno << "\n";
    cout << "Marks : "<<marks << endl;
  }
};
int main()
{
  student s(14,70);
  s.printdet();
  cout << "Back to Main";
  return 0;
}

Solutions for 14: Classes and objects

Evaluation - Section – AEvaluation - Section - BEvaluation - Section - CEvaluation - Section - D
Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board chapter 14 - Classes and objects - Shaalaa.com

Samacheer Kalvi solutions for Computer Science [English] Class 11 TN Board chapter 14 - Classes and objects

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 14 (Classes and objects) 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 14 Classes and objects are Introduction to Classes, Creating Objects, Memory Allocation of Objects, Referencing Class Members, Constructors and Destructors, Declaration and Definition of a Constructor, Constructors and Destructors, Characteristics of Constructors, Constructors and Destructors, Constructors and Destructors, Constructors and Destructors.

Using Samacheer Kalvi Computer Science [English] Class 11 TN Board solutions Classes and objects 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 14, Classes and objects 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×