//5.7Ϥͳ󷽷Ķʹá
abstract class Shape
{
	public abstract double ();
}
class  extends Shape
{
	double a,b,h;
	(double a,double b,double h)
	{
		this.a=a;this.b=b;this.h=h;
	}
	public double ()
	{
		return((a+b)*h*0.5);
	}
}
class Բ extends Shape
{
	double r;
	Բ(double r)
	{
		this.r=r;
	}
	public double ()
	{
		return(Math.PI*r*r);
	}
}
public class Abstractshape
{
	public static void main(String args[])
	{
		Shape trapzoid = new (2.0,7.0,10);	
		Shape oval = new Բ(2.0);
		System.out.println(""+trapzoid.());
		System.out.println("Բ"+oval.());		
	}	
}
