OOP.Project
OOP.Project
Submitted By
Guided By
Mrs.P.B.Kaslakar
Mrs.P.B. Ms.J.N.Gurav
Kasalkar HOD
Project Guide
Date – / /
Place – Talsande
INDEX
1 Introduction 1
2 Requirement 2
3 Program 3-6
4 Result 7-10
5 Conclusion 11
6 References 12
1. INTRODUCTION
3. The switch case is a powerful control structure in c++ that allows for
clear and organized handling of multiple conditions, making it ideal for
this type of calculator program.
1. Computer System
2. Operating System
Specification:-Windows
Quantity :1
3. Software
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
class calculator
public:
Addition=a+b;
cout<<"ADDITION: "<<Addition<<endl;
substraction=c-d;
cout<<"SUBSTRACTION: <<substraction<<endl;
multiplication=e*f;
cout<<"MULTIPLICATION: "<<multiplication<<endl;
}
Division=g/h;
cout<<"DIVISION: "<<division<<endl;
void squ(int i)
square=i*i;
cout<<"SQUARE: "<<square<<endl;
void cub(int j)
cube=j*j*j;
cout<<"CUBE:"<<cube<<endl;
average k/l;
cout<<"AVERAGE:"<<average<<endl;
}
};
void main()
clrscr();
calculator c;
int choice;
do
cout<<” “<<endl;
SUBSTRACTION"<<endl<<”3MULTIPLICATION”<<endl<<”4
AVERAGE"<<endl<<"8 Exit"<<end1;
cin>>choice:
switch(choice)
case 1:
float A,B;
cin>>A:
cout<<"Enter The Value Of B:"<<endl;
cin>>B:
c.add(A,B);
break;
case 2:
int C,D;
cin>>C;
cin>>D;
c.sub(C,D);
break;
case 3:
double E,F;
cin>>E;
cin>>F;
c.mul(E,F);
cout<<" ------------------------------------------------------------------------ “<<endl;
break;
case 4:
int G,H;
cin>>G;
cin>>H;
c.div(G,H);
break;
case 5:
int I;
cin>>I;
c.squ(I);
break;
case 6:
int J;
cin>>J;
c.cub(J);
break;
case 7:
int K,L;
cin>>K;
cin>>L;
c.avg(K,L);
break;
case 8: exit(0);
}while(choice!=4);
getch();
}
4. RESULT :
5. CONCLUSION :
1. https://www.scribd.com/document/610574138/Oop
2. https://openai.com/index/chatgpt/