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

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

class SCORE
{
int Scno,Max,Min,Rank;
public:
SCORE() //Function1
{
Scno = 1;
Max = 10;
Min = 2;
Rank = 5;
}
SCORE(int a, int b) //Function2
{
Scno = a;
Max = 10;
Min = 2;
Rank = 5;
}
~SCORE() //Function3
{
cout<<"Compute"<<endl;
}
void Show() //Function4
{
cout<<Scno<<":"<<Max<<":"<<Min<<endl;
cout<<"Rank"<<Rank<<endl;
}
};

(i) As per Object Oriented Programming, which concept is illustrated Function1 and Function2 together?
(ii) What is Function2 specifically referred as? When do you think, Function3 will be invoked?



No comments

Post your comments

Powered by Blogger.