For Daily Free Study Material Join wiredfaculty Whatsapp Group | Download Android App | Ncert Book Download
Sponsor Area
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?