about summary refs log tree commit diff
path: root/usth/ICT2.2/labwork/5/Java/interface/Circle.java
blob: 3ee8c84e7161b221be7e9197665c9bb2d4b65f4f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
public class Circle extends Point
{
  public double r;

  public Circle(double x, double y, double r)
  {
    super(x, y);
    this.r = r;
  }

  public double calArea() { return r * r * Math.PI; }
  public String getName() { return "Circle"; }
}