






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"Plants.h" #include"phy_lab.h" class botony_lab { stu student_botony[100]; float bot; int record_no,plant_edit,apparatus_edit,b; rec_handler record_botony[100]; attendant botony_attendant; location botony_lab_location; capacity botony_lab_capacity; timings botony_lab_timings; plant botony_plants[30]; apparatus botony_apparatus[20]; public: botony_lab():record_no(0),plant_edit(0),apparatus_edit(0){} int botony_menu() { int a; while(1) { q7: cin.clear(); cout<<"PRESS \n1 FOR VIEWING LAB INFORMATION \n"; cout<<"2 FOR EDITING DATA \n"; cout<<"3 FOR HAVING A LAB SESSION \n"; cout<<"4 FOR VIEWING YOUR LAB PARTICULARS \n"; cout<<"5 TO VIEW STUDENT RECORD \n"; cout<<"6 TO RETURN TO MAIN MENU \n"; flushall(); cin>>bot; system("cls"); a=bot; if(bot-a>0) { cout<<"Not a valid option \n"; flushall(); goto q7; } if ( a!=1 && a!=2 && a!=3 && a!=4 && a!=5 && a!=6) { cout << "Not a Valid choice \n" ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; 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>>b; system("cls"); if (b<1||b>record_no) { cout << " Not a Valid choice \n " ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; continue ; } view_lab(b); 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------"<<botony_lab_location.g1_r()<<endl; cout<<"LAB NAME------ "<<botony_lab_location.g2_r()<<endl<<endl; cout<<"^^^^^^^^^^^^^^^^^^^^^LAB TIMINGS^^^^^^^^^^^^^^^^^^^^^^"<<endl<<endl; cout<<"OPENING TIME-------"<< botony_lab_timings.g_rec()<<"hrs"<<endl; cout<<"CLOSING TIME-------"<< botony_lab_timings.g1_rec()<<"hrs"<<endl<<endl; cout<<"^^^^^^^^^^^^^^^^^^^^^LAB CAPACITY^^^^^^^^^^^^^^^^^^^^^"<<endl<<endl; cout<<"TOTAL NUMBER OF STUDENTS-------- "<<botony_lab_capacity.get_students()<<endl<<endl; cout<<"^^^^^^^^^^^^^^^LAB ATTENDANT PARTICULARS^^^^^^^^^^^^^^"<<endl<<endl; cout<<"NAME------"<<botony_attendant.get_rc()<<endl;
cin.clear () ; cin.ignore (INT_MAX,'\n') ; continue ; } switch(a) { case 1: cout<<"enter name of attendant\n"; flushall(); cin.getline(botony_attendant.get_rc(),100,'\n'); system("cls"); cout<<"enter experiance of attendant\n"; flushall(); cin.getline(botony_attendant.gt_rc(),100,'\n'); system("cls"); cout<<"enter registration number of attendant\n"; flushall(); cin.getline(botony_attendant.g_rc(),100,'\n'); system("cls"); break; case 2: cout<<"enter name of college\n"; flushall(); cin.getline(botony_lab_location.g1_r(),100,'\n'); system("cls"); flushall(); cout<<"enter name of LAB\n"; cin.getline(botony_lab_location.g2_r(),100,'\n'); system("cls"); break; case 3: E: cin.clear(); cout<<"enter number of students which can be accumudated in lab\n"; flushall(); int k; cin>>k; system("cls"); if(k>0) { botony_lab_capacity.get_students()=k; } else { cout<<"Not a Valid choice \n" ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; goto E ; } 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) { botony_lab_timings.g_rec()=k; } else { cout<<"Not a Valid choice \n" ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; goto F ; } system("cls"); cout<<"enter closing time of lab\n"; G: cin.clear(); flushall(); k=0; cin>>k; system("cls"); if(k>=botony_lab_timings.g_rec() && k<=2400) { botony_lab_timings.g1_rec()=k; } else { cout<<"Not a Valid choice \n" ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; goto G ; } flushall(); system("cls"); break; case 5: H: cin.clear(); cout<<"PRESS 1 FOR NEW PLANT PRESS 2 FOR EDITING PLANTS"; cin>>c; if(c!=1 && c!=2) { cout<<"Not a Valid choice \n" ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; goto H ; } if(c==1) {
cin.getline( botony_plants[d].get_specie(),100,'\n'); //cin.sync(); system("cls"); int g; cout<<"ENTER NUMBERS OF PLANTS\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 { botony_plants[d].get_number()=g; } system("cls"); } break; case 6: cout<<"PRESS 1 FOR NEW APPARATUS PRESS 2 FOR EDITING APPARATUS"; cin>>c; system("cls"); if(c==1) { cout<<"ENTER NAME OF APPARATUS\n"; flushall(); cin>> botony_apparatus[apparatus_edit].get_name(); flushall(); system("cls"); cout<<"ENTER NUMBER OF APPARATUS\n"; flushall(); cin>> botony_apparatus[apparatus_edit].get_count(); system("cls"); apparatus_edit++; } else { e=apparatus_edit-1; cout<<"ENTER SERIAL NUMBER OF APPARATUS (0- "<<e<<")\n"; cin>>d; system("cls"); cout<<"ENTER NAME OF APPARATUS\n"; flushall(); cin>> botony_apparatus[d].get_name(); cin.sync();
system("cls"); cout<<"ENTER QUANTITY OF APPARATUS\n"; flushall(); cin>> botony_apparatus[d].get_count(); system("cls"); } break; case 7: b=0; D: cin.clear(); cout<<"ENTER REGISTRATION NUMBER OF STUDENT\n"; flushall(); cin>>b; system("cls"); if(b<0||b>99) { cout<<"Not a Valid choice \n" ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; goto D ; } edit_STUDENT(b); case 8: return 1; } } } void lab_session() { cout<<"ENTER DATE OF LAB SESSION\n"; flushall(); cin>>record_botony[0].get_dt(1); system("cls"); cout<<"ENTER MONTH OF LAB SESSION\n"; flushall(); cin>>record_botony[0].get_dt(2); system("cls"); cout<<"ENTER YEAR OF LAB SESSION\n"; flushall(); cin>>record_botony[0].get_dt(3); system("cls"); cout<<"ENTER NO. OF STUDENTS YOU WANT TO HAVE A LAB SESSION\n"; flushall(); cin>>record_botony[0].get_c(); system("cls"); cout<<"ENTER STARTING TIME OF LAB IN hrs (FORM 0100-2400)\n"; flushall(); cin>>record_botony[0].get_t(1); system("cls"); cout<<"ENTER ENDING TIME OF LAB IN hrs (FORM 0100-2400)\n"; flushall(); cin>>record_botony[0].get_t(2);
void view_lab(int a) { cout<<"YOUR LAB WILL hold AT (dd/mm/yy) "<<record_botony[a].get_dt(1)<<"/"
<<record_botony[a].get_dt(2)<<"/"<<record_botony[a].get_dt(3)<<endl ; cout<<"YOUR LAB WILL START AT "<<record_botony[a].get_t(1)<<"hrs"<<endl; cout<<"YOUR LAB WILL END AT "<<record_botony[a].get_t(2)<<"hrs"<<endl; cout<<"TOTAL NUMBER OF STUDENTS IN YOUR LAB IS "<<record_botony[a].get_c()<<endl; cout<<"PLANTS AVAILABLE IN YOUR LAB ARE\n"<<endl; cout<<"NAME\t\t\tSPECIE\t\tNUMBERS"<<endl; for(int i=0;i<(plant_edit);i++) { cout<< botony_plants[i].get_plants()<<setw(30-strlen( botony_plants[i].get_plants()))<< botony_plants[i].get_specie();cout<<setw(18)<< botony_plants[i].get_number()<<endl; } cout<<"APPARATUS AVAILABLE IN YOUR LAB ARE\n"<<endl; cout<<"NAME\t\t\tTOTAL NUMBERS"<<endl; for(int i=0;i<(apparatus_edit);i++) { cout<< botony_apparatus[i].get_name()<<setw(30-strlen( botony_apparatus[i].get_name())) << botony_apparatus[i].get_count()<<endl; } } void view_STUDENT(int a) { cout<<"NAME OF STUDENT \n"<<endl<<student_botony[a].get_comp(1)<<endl; cout<<"FATHER'S NAME \n"<<endl<<student_botony[a].get_comp(2)<<endl; cout<<"TOTAL LAB SESSIONS \n"<<endl;cout<<student_botony[a].get_comp(3)<<endl; cout<<"NO. OF LABS STUDENT ATTENDED \n"<<endl<<student_botony[a].get_comp(4)<<endl; cout<<"AGGEREGATE OF STUDENT IN LAB \n"<<endl<<student_botony[a].get_comp(5)<<endl; } void edit_STUDENT(int a) { flushall();
cout<<"NAME OF STUDENT \n"; flushall(); cin.getline(student_botony[a].get_comp(1),100,'\n'); system("cls"); cout<<"FATHER'S NAME \n"; flushall();
cin.getline(student_botony[a].get_comp(2),100,'\n'); system("cls"); cout<<"TOTAL LAB SESSIONS \n"; flushall(); cin.getline(student_botony[a].get_comp(3),100,'\n'); system("cls"); cout<<"NO. OF LABS STUDENT ATTENDED \n"; flushall(); cin.getline(student_botony[a].get_comp(4),100,'\n'); system("cls"); cout<<"AGGEREGATE OF STUDENT IN LAB \n"; flushall(); cin.getline(student_botony[a].get_comp(5),100,'\n'); system("cls"); } };