FUNCTIONS, CONSTRUCTOR, DESTRUCTOR & OVERLOADING QUESTIONS IN C++. (2)

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

class Meeting
{
int Time;
public:
Meeting() //Function1
{
Time = 30;
cout<<"Meeting starts now"<<endl;
}
void Discussion(int) //Function2
{
cout<<"Discution in the Meeting on "<<endl;
}
Meeting(int Duration;
{
Time = Duration;
cout<<"Meeting starts now"<<endl;
}
~ Meeting() //Function4
{
cout<<"Vote for thanks"<<endl;
}
};

void main() //Line1
{ //Line2
clrscr(); //Line3
Meeting M; //Line4
M.Discussion(6); //Line5
M.Discussion(10); //Line6
getch(); //Line7
} //Line8

(i) In object Oriented Programming, which concept is illustrated by Function1 and Function3 together?
(ii) How many times the message "Vote for thanks" will be displayed after executing the above C++ code? Out of Line1 to Line8,
which line is responsible to display the message "Vote for thanks"?


No comments

Post your comments

Powered by Blogger.