class Point
{
private double x;
private double y;
public Point(double a,double b)
{
x=a;
y=b;
}
public virtual double Perimeter()
{
}
public virtual double Area()
{
}
}
class Circle:public Point
{
private double radius;
public Circle(double r)
{
radius=r;
}
public double
Perimeter()
{
return 2*Math.PI*radius;
}
public double Area()
{
return Math.PI*radius*radius;
}
}
[
本帖最后由 jedypjd 于 2010-2-24 17:20 编辑 ]