






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







#include"attendant.h" #include"location.h" #include"rec_store.h" #include"chemics.h" #include"appararus.h" #include"STUDENT.h" #include"iomanip" #include<conio.h> #include<process.h> #include
continue ; } switch(a) { case 1: get_rec(); break; case 2: set_rec(); break; case 3: lab_session(); break; case 4: cout<<"ENTER YOUR TOKEN NUMBER\n"; cin>>token; system("cls"); if(token<1||token>record_no) { cout<<"WRONG INPUT\n"; break; } view_lab(token); break; case 5: cout<<"ENTER REGISTRATION NUMBER OF STUDENT\n"; cin>>b; system("cls"); if(b<0||b>99) { cout<<"WRONG INPUT\n"; break; } view_STUDENT(b); break; case 6: return 1; break; } } } void get_rec() {
cout<<"^^^^^^^^^^^^^^^^^^^^^LAB LOCATION^^^^^^^^^^^^^^^^^^^^^"<<endl<<endl; cout<<"COLLEGE NAME------ "<<chem_lab_location.g1_r()<<endl;cout<<"LAB NAME---------- "<<chem_lab_location.g2_r()<<endl<<endl; cout<<"^^^^^^^^^^^^^^^^^^^^^LAB TIMINGS^^^^^^^^^^^^^^^^^^^^^^"<<endl<<endl; cout<<"OPENING TIME------ "<<chem_lab_timings.g_rec()<<"hrs"<<endl;cout<<"CLOSING TIME------ "<<chem_lab_timings.g1_rec()<<"hrs"<<endl<<endl;
cout<<"Not a valid option \n"; goto q3; } if ( a!=1 && a!=2 && a!=3 && a!=4 && a!=5 && a!=6 && a!=7 && a!=8) { cout << "Not a Valid choice \n" ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; continue ; } switch(a) { case 1: cout<<"enter name of attendant\n"; flushall(); cin.getline(chem_attendant.get_rc(),100,'\n'); system("cls"); cout<<"enter experiance of attendant\n"; flushall(); cin.getline(chem_attendant.gt_rc(),100,'\n'); system("cls"); cout<<"enter registration number of attendant\n"; flushall(); cin.getline(chem_attendant.g_rc(),100,'\n'); system("cls"); break; case 2: cout<<"enter name of college\n"; flushall(); cin.getline(chem_lab_location.g1_r(),100,'\n'); system("cls"); flushall(); cout<<"enter name of LAB\n"; cin.getline(chem_lab_location.g2_r(),100,'\n'); system("cls"); break; case 3: H: cin.clear(); cout<<"enter number of students which can be accumudated in lab\n"; flushall(); int k; cin>>k; system("cls"); if(k>0) { chem_lab_capacity.get_students()=k; } else { cout<<"Not a Valid choice \n" ; cin.clear () ;
cin.ignore (INT_MAX,'\n') ; goto H ; } //cin>>chem_lab_capacity.get_students(); system("cls"); break; case 4: F: cin.clear(); cout<<"enter opening time of lab\n"; flushall(); k=0; cin>>k; system("cls"); if(k>=0 && k<=2400) { chem_lab_timings.g_rec()=k; } else { cout<<"Not a Valid choice \n" ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; goto F ; } //cin>>chem_lab_timings.g_rec(); system("cls"); G: cin.clear(); cout<<"enter closing time of lab\n"; flushall(); k=0; cin>>k; system("cls"); if(k>=chem_lab_timings.g_rec() && k<=2400) { chem_lab_timings.g1_rec()=k; } else { cout<<"Not a Valid choice \n" ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; goto G ; } //cin>>chem_lab_timings.g1_rec(); system("cls"); break; case 5: E: cin.clear(); cout<<"PRESS 1 FOR NEW CHEMICAL PRESS 2 FOR EDITING CHEMICAL"; cin>>c;
cout<<"Not a Valid choice \n" ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; goto B ; } system("cls"); cout<<"ENTER NAME OF CHEMICAL\n"; flushall();
cin.getline(chem_chemicals[d].get_name(),100,'\n'); system("cls"); cout<<"ENTER NATURE OF CHEMICAL\n"; flushall();
cin.getline(chem_chemicals[d].get_nature(),100,'\n'); cin.sync(); system("cls"); int g; A: cin.clear(); cout<<"ENTER QUANTITY OF CHEMICAL\n"; flushall(); cin.sync(); cin>>g; flushall(); if(g<0) { cout<<"Not a Valid choice \n" ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; goto A ; } else { chem_chemicals[d].get_quantity()=g; } //cin>>chem_chemicals[d].get_quantity(); system("cls"); } break; case 6: cout<<"PRESS 1 FOR NEW APPARATUS PRESS 2 FOR EDITING APPARATUS"; flushall(); cin>>c; system("cls"); if(c==1) { cout<<"ENTER NAME OF APPARATUS\n"; flushall();
cin>>chem_apparatus[chem_apparatus_edit].get_name(); flushall(); system("cls");
int g; L: cin.clear(); cout<<"ENTER NUMBER OF APPARATUS\n"; flushall(); cin.sync(); cin>>g; flushall(); if(g<0) { cout<<"Not a Valid choice \n" ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; goto L ; } else {
chem_apparatus[chem_apparatus_edit].get_count()=g; }
//cin>>chem_apparatus[chem_apparatus_edit].get_count(); system("cls"); chem_apparatus_edit++; } else { e=chem_apparatus_edit-1; M: cin.clear(); cout<<"ENTER SERIAL NUMBER OF APPARATUS (0- "<<e<<")\n"; flushall(); cin>>d; if ( d<0 || d>e ) { cout<<"Not a Valid choice \n" ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; goto M ; } system("cls"); cout<<"ENTER NAME OF APPARATUS\n"; flushall(); cin>>chem_apparatus[d].get_name(); cin.sync(); system("cls"); int g; X: cin.clear(); cout<<"ENTER QUANTITY OF APPARATUS\n"; flushall(); cin>>g; flushall();
cout<<"ENTER STARTING TIME OF LAB IN hrs (FORM 0100- 2400)\n"; flushall(); cin>>record_chem[0].get_t(1); system("cls"); cout<<"ENTER ENDING TIME OF LAB IN hrs (FORM 0100- 2400)\n"; flushall(); cin>>record_chem[0].get_t(2);system("cls"); comparison(); } void comparison() { int i; for(i=1;i<100;i++) { if( (record_chem[i].get_dt(1)==record_chem[0].get_dt(1))&&(record_chem[ i].get_dt(2)==record_chem[0].get_dt(2))
&&(record_chem[i].get_dt(3)==record_chem[0].get_dt(3))&&(record_che m[i].get_t(1)==record_chem[0].get_t(1))
&&(record_chem[i].get_t(2)==record_chem[0].get_t(2)) ) { cout<<"SORRY YOU CAN NOT HAVE LAB SESSION AS ON THE SPECIFIED DATE AND TIME THERE IS ANOTHER LAB\n"; break; } if( (record_chem[0].get_c()>chem_lab_capacity.get_students()) || (record_chem[0].get_t(1)<chem_lab_timings.g_rec()) || (record_chem[0].get_t(2)>chem_lab_timings.g1_rec()) ) { cout<<"SORRY YOU CAN NOT HAVE LAB SESSION AS SPECIFIED PARTICULARS ARE NOT MATCHING WITH LAB PARTICULARS\n"; break; } } if(i==100) { record_no++;
record_chem[record_no].get_dt(1)=record_chem[0].get_dt(1);
record_chem[record_no].get_dt(2)=record_chem[0].get_dt(2);
record_chem[record_no].get_dt(3)=record_chem[0].get_dt(3);
record_chem[record_no].get_c()=record_chem[0].get_c();
record_chem[record_no].get_t(1)=record_chem[0].get_t(1);
record_chem[record_no].get_t(2)=record_chem[0].get_t(2); cout<<"\n\n"<<"YOUR REQUEST FOR LAB IS ACCEPTED\nYOUR TOKEN NUMber is "<<record_no<<"\n\n"; } } void view_lab(int a) { cout<<"YOUR LAB WILL hold AT (dd/mm/yy) "<<record_chem[a].get_dt(1);
cout<<"/"<<record_chem[a].get_dt(2)<<"/"<<record_chem[a].get_dt(3)< <endl; cout<<"YOUR LAB WILL START AT "<<record_chem[a].get_t(1)<<"hrs"<<endl; cout<<"YOUR LAB WILL END AT "<<record_chem[a].get_t(2)<<"hrs"<<endl; cout<<"TOTAL NUMBER OF STUDENTS IN YOUR LAB IS "<<record_chem[a].get_c()<<endl; cout<<"CHEMICALS AVAILABLE IN YOUR LAB ARE\n"<<endl; cout<<"NAME\t\t\tNATURE\t\tQUANTITY IN ml"<<endl; for(int i=0;i<(chem_edit);i++) { cout<<chem_chemicals[i].get_name()<<setw(30- strlen(chem_chemicals[i].get_name()));
cout<<chem_chemicals[i].get_nature();cout<<setw(18)<<chem_chemicals [i].get_quantity()<<endl; } cout<<"APPARATUS AVAILABLE IN YOUR LAB ARE\n"<<endl; cout<<"NAME\t\t\tTOTAL NUMBERS"<<endl; for(int i=0;i<(chem_apparatus_edit);i++) { cout<<chem_apparatus[i].get_name()<<setw(30- strlen(chem_apparatus[i].get_name())); cout<<chem_apparatus[i].get_count()<<endl; } } void view_STUDENT(int a) { cout<<"NAME OF STUDENT \n"<<endl<<student_chem[a].get_comp(1)<<endl; cout<<"FATHER'S NAME \n"<<endl<<student_chem[a].get_comp(2)<<endl; cout<<"TOTAL LAB SESSIONS \n"<<endl;cout<<student_chem[a].get_comp(3)<<endl; cout<<"NO. OF LABS STUDENT ATTENDED \n"<<endl<<student_chem[a].get_comp(4)<<endl; cout<<"AGGEREGATE OF STUDENT IN LAB \n"<<endl<<student_chem[a].get_comp(5)<<endl; }