interface IShape
{
double Area();
}
interface ISingSong
{
void Song();
}
class Person : ISingSong
{
public void Song()
{
Console.WriteLine("你若安好,我不打扰");
}
}
class Square : IShape
{
public int Side { get; set; }
public Square()
{
}
public Square(int side)
{
Side = side;
}
public double Area()
{
return Side * Side;
}
}
class Birds : ISingSong
{
public void Song()
{
Console.WriteLine("叽叽叽叽");
}
}
class Cat : ISingSong
{
public void Song()
{
Console.WriteLine("喵喵喵");
}
}
class Circle : IShape
{
public int Radius { get; set; }
public Circle()
{
}
public Circle(int radius)
{
Radius = radius;
}
public double Area()
{
return Radius * Radius * Math.PI;
}
}