Friend Function Implementation using C++

Posted on
Pal Perform Implementation utilizing C++

#embrace

#embrace #embrace

#embrace

#embrace

int i=0;

int idno;

class scholar

{

public:

buddy void challenge ();

buddy void  ret ();

};

class lib

{

char identify[10];

int roll; 

public:

int standing;

lib();

void idinfor();

buddy void challenge ();

buddy void  ret ();

};

lib::lib()

{

standing=0;

}

void lib::idinfor()

{

i++;

cout<<“nntt ENTER UR NAME…”; will get(identify); cout<<“nntt ENTER UR ROLL NO…”; cin>>roll;

cout<<“nntt UR ID NUMBER IS….”<

}

void challenge(int standing)

{

int bn;

cout<<“nntt LIST OF AVAILABLE BOOKS FOR U”; cout<<“nntt PRESS 1 BALAntt PRESS 2 VENUntt PRESS 3 OOPSntt PRESS 4 MAT”; cout<<“nntt ENTER UR CHOICE”; cin>>bn;

if(standing<3)     {

cout<<“nntt BOOK IS AVAILABLE FOR U”; } else { cout<<“nntt BOOK IS NOT AVAILABLE FOR U”; cout<<“nntt U CANT ISSUE MORE THAN TWO BOOKS”; } } void ret() { cout<<“nntt THANK YOU”; } void fundamental() { lib l[10]; int ch; clrscr(); do { cout<<“ntt PRESS 1 FOR UR ID NUMBER INFORMATION”; cout<<“ntt PRESS 2 FOR ISSUE A NEW BOOK “; cout<<“ntt PREES 3 FOR RETURN A BOOK “; cout<<“ntt PRESS 4 FOR EXIT”; cout<<“ntt ENTER UR CHOICE…”; cin>>ch;

change(ch)

{

case 1:

clrscr();

l[i].idinfor();

break;

case 2:

clrscr();

cout<<“nnttENTER UR ID NO…”; cin>>idno;

challenge(l[i].standing);

l[i].standing++;

break;

case 3:

clrscr();

cout<<“nnttENTER UR ID NO…”; cin>>idno;

ret();

l[i].standing–;

break;

case 4:

exit(0);

break;

}

}whereas(ch!=4);

}

Supply projectgeek.com