Good Evening
19:24 pm

Sponsor Area

Sponsor Area

Question is

Answer the question (i) and (ii) after going through the following class :

class Travel
{
	int PlaceCode; char Place[20]; float Charges; public:
Travel( )	//Function 1
{
	PlaceCode=1;strcpy(Place,”DELHI”);Charges=1000;
}
void TravelPlan(float C )	// Function 2
{
	cout<<PlaceCode<<“:”<<Place<<”:”<<Charges<<endl;
}
~Travel( )	// Function 3
{
	cout<<”Travel Plan Cancelled”<<endl;
}
Travel(int PC,char p[],float C)	// Function 4
{
	PlaceCode=PC;strcpy(Place,P);Charges=c;
}

(i) In Object Oriented Programming, what are Function 1 and Function 4 combined together referred as?

(ii) In Object Oriented Programming, which concept is illustrated by Function 3? When is this function called/invoked?

Mock Test Series

Sponsor Area

Sponsor Area

NCERT Book Store

NCERT Sample Papers

Entrance Exams Preparation