--
#include<iostream.h>
#include<conio.h>
class shape
{
public:
virtual void show()=0
};
class circle:public shape
{
float r;
public:
void get1()
{
cout<<"\n Enter Redius : ";
cin>>r;
}
void show()
{
cout<<"\n Area Of circle : "<<3.14*(r*r);
}
};
class rectangle:public shape
{
float l,b;
public:
void get2()
{
cout<<"\n Enter Length & Bridth ";
cout<<"\n Length : ";
cin>>l;
cout<<"\n Bridth : ";
cin>>b;
}
void show()
{
cout<<"\n Area of rectangle : "<
}
};
class triangle:public shape
{
float b,h;
public:
void get3()
{
cout<<"\n Enter Base & Height : ";
cout<<"\n Base : ";
cin>>b;
cout<<"\n Height : ";
cin>>h;
}
void show()
{
int t;
t=1/2.0*(b*h);
cout<<"\n Area of triangle : "<
}
};
void main()
{
clrscr();
shape *s;
circle c;
rectangle r;
triangle t;
cout<<"\n Accept info ........";
c.get1();
cout<<"\n----------------------------------";
r.get2();
cout<<"\n----------------------------------";
t.get3();
cout<<"\n----------------------------------";
s=&c;
s->show();
cout<<"\n----------------------------------";
s=&r;
s->show();
cout<<"\n----------------------------------";
s=&t;
s->show();
getch();
}