Matlab-Object Oriented Programming-C Language Codes, Exercises of Object Oriented Programming

Objective of this cours is to develop effective computer programming skills in solving complex problems and to learn adequate and operational software organization in developing real life engineering solutions using powerful object oriented paradigm of the language. It includes: Include, Class, Public, Float, Continue, While, Input, System, Case, Switch

Typology: Exercises

2011/2012

Uploaded on 07/31/2012

netu
netu 🇮🇳

4.5

(4)

50 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
#include"copmuter.h"
class MAIN_LB:public chem_lab,public PHYSICS_lab,public bio,public comput
{
float z;
int input;
public:
int get_menu()
{
while(1)
{
q1:
z=0;
cin.clear();
cout<<" IN WHICH LAB YOU WANT TO ENTER\n\n";
cout<<" PRESS 1 FOR BIOLOGY LAB\n";
cout<<" PRESS 2 FOR COMPUTER LAB\n";
cout<<" \tPRESS 3 FOR CHEMISTRY LAB\n";
cout<<" PRESS 4 FOR PHYSICS LAB\n";
cout<<" PRESS 5 FOR EXIT\n";
cin>>z;
system("cls");
input=z;
if(z-input>0)
{
cout<<"Not a valid option \n";
goto q1;
}
if ( input!=1 && input!=2 && input!=3 && input!=4 &&
input!=5 )
{
cout<<"Not a Valid choice \n" ;
cin.clear () ;
cin.ignore (INT_MAX,'\n') ;
continue ;
}
switch(input)
{
case 1:
biology_menu();
break;
case 2:
computer_menu();
break;
case 3:
chemistry_menu();
break;
case 4:
physics_menu();
break;
case 5:
return 1;
break;
docsity.com
pf2

Partial preview of the text

Download Matlab-Object Oriented Programming-C Language Codes and more Exercises Object Oriented Programming in PDF only on Docsity!

#include"copmuter.h"

class MAIN_LB:public chem_lab,public PHYSICS_lab,public bio,public comput { float z; int input; public: int get_menu() { while(1) { q1: z=0; cin.clear(); cout<<" IN WHICH LAB YOU WANT TO ENTER\n\n"; cout<<" PRESS 1 FOR BIOLOGY LAB\n"; cout<<" PRESS 2 FOR COMPUTER LAB\n"; cout<<" \tPRESS 3 FOR CHEMISTRY LAB\n"; cout<<" PRESS 4 FOR PHYSICS LAB\n"; cout<<" PRESS 5 FOR EXIT\n"; cin>>z; system("cls"); input=z; if(z-input>0) { cout<<"Not a valid option \n"; goto q1; }

if ( input!=1 && input!=2 && input!=3 && input!=4 && input!=5 ) { cout<<"Not a Valid choice \n" ; cin.clear () ; cin.ignore (INT_MAX,'\n') ; continue ; } switch(input) { case 1: biology_menu(); break; case 2: computer_menu(); break; case 3: chemistry_menu(); break; case 4: physics_menu(); break; case 5: return 1; break;

docsity.com

default: goto q1;

} } } };

docsity.com