
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A c++ program for a biology lab menu that allows users to choose between botony lab, zoology lab, or going back to the main menu. The program uses classes and inheritance, with functions for displaying the menu and taking user input.
Typology: Exercises
1 / 1
This page cannot be seen from the preview
Don't miss anything!
#include"zoology.h" class bio:public botony_lab,public zoology_lab { int a; float b; public: int biology_menu() { //cout<<b<<endl; while(1) { q6: b=0; cin.clear(); cout<<"IN WHICH LAB YOU WANT TO ENTER\n"; cout<<"PRESS 1 FOR BOTONY LAB\n"; cout<<"PRESS 2 FOR ZOOLOGY LAB\n"; cout<<"PRESS 3 FOR GOING BACK\n"; flushall(); cin>>b; system("cls"); a=b; if(b-a>0) { cout<<"Not a valid option \n"; flushall(); goto q6; } if ( a!=1 && a!=2 && a!=3 ) { cout << "Not a Valid choice \n" ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; continue ; } switch(a) { case 1: botony_menu(); break; case 2: zoology_menu(); break; case 3: b=0; return 1; break; default: goto q6; } } } };