描述点的类Point
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ClassStudy2
{
class Point
{
private int x;
private int y;
private int z;
public int X
{
get { return this.x; }
set { this.x = value; }
}
public int Y
{
get { return this.y; }
set { this.y = value; }
}
public Point()
{
}
public Point(int x, int y)
{
this.x = x;
this.y = y;
}
public Point(int z)
: this(z, z)
{
}
public double DistanceFromOrgin()
{
return Math.Sqrt(x * x + y * y);
}
public double DistanceFromPoint(Point p)
{
return Math.Sqrt((this.x - p.x) * (this.x - p.x) + (