class Area
{ double height;
double width;
public:
Area(double h,double w)
{
height=h;
width=w;
}
virtual double getArea()=0;
};
#include <iostream>
using namespace std;
class Area{
protected:
double height;
double width;
public:
Area(double h,double w)
{
height=h;
width=w;
}
virtual double getArea()=0;
};
class Rectangle:public Area{
public:
Rectangle(double h, double w) : Area(h, w) {}
double getArea(){
return height*width;
}
};
class Isosceles:public Area{
public:
Isosceles(double h, double w) : Area(h, w) {}
double getArea(){
return height*width*(0.5);
}
};
int main(){
double a,b,c,d;
cin>>a>>b>>c>>d;
Rectangle rectangle(a,b);
Isosceles isosceles(c,d);
cout<<"the Area of Rectangle is "<<rectangle.getArea()<<endl;
cout<<"the Area of Isosceles is "<<isosceles.getArea()<<endl;
}