#include #include class ar {private:float a; public:ar() {a=0;} ~ar() {a=0;} void area(float x) {a=3.4142*x*x; } void area(float x,float y) {a=x*y; } void area(float x,float y,int u) {a=(x*y)/2; } void showarea() {cout<<"\n the area of the figure is:"<>i; switch(i) {case 1:cout<<"\nfor circle\n"; cout<<"\n enter the radius of the circle:"; cin>>r; n1.area(r); n1.showarea(); break; case 2:cout<<"\nfor rectangle\n"; cout<<"\n enter the length of the rectangle:"; cin>>h; cout<<"\n enter the width of the rectangel:"; cin>>b; n1.area(h,b); n1.showarea(); break; case 3:cout<<"\nfor triangle\n"; cout<<"\n enter the height of the triangle:"; cin>>h; cout<<"\n enter the base length of the triangel:"; cin>>b; n1.area(h,b,1); n1.showarea(); break; default:cout<<"\n sorry you have entered wrong choice\n"; } cout<<"\n do you want to continue (yes:0,no:1):"; cin>>n; } getch(); }