FUNCTIONS, CONSTRUCTOR, DESTRUCTOR & OVERLOADING QUESTIONS IN C++. (14)
Answer the questions (i) and (ii) after going through the following class:
class Seminar
{
int Time;
public:
Seminar() //Funciton1
{
Time=30;
cout<<"Seminar starts now"<<endl;
}
void Lecture() //Funciton2
{
cout<<"|Lectures in the seminar on"<<endl;
}
Seminar(int Duration) //Function3
{
Time=Duration;
cout<<"Seminar Starts now"<<endl;
}
~ Seminar() //Funciton4
{
cout<<"Vote of thanks"endl;
}
};
(i) In Object Oriented Programming, what is Funciton4 referred to as and when does it get invoked/called?
(ii) In Object Oriented Programming, which concept is illustrated by Funciton1 and Function3 together? Write an example illustrating the calls for these functions.
class Seminar
{
int Time;
public:
Seminar() //Funciton1
{
Time=30;
cout<<"Seminar starts now"<<endl;
}
void Lecture() //Funciton2
{
cout<<"|Lectures in the seminar on"<<endl;
}
Seminar(int Duration) //Function3
{
Time=Duration;
cout<<"Seminar Starts now"<<endl;
}
~ Seminar() //Funciton4
{
cout<<"Vote of thanks"endl;
}
};
(i) In Object Oriented Programming, what is Funciton4 referred to as and when does it get invoked/called?
(ii) In Object Oriented Programming, which concept is illustrated by Funciton1 and Function3 together? Write an example illustrating the calls for these functions.
No comments
Post your comments