using System; public class Point { public Point(int x, int y) { r=Math.Sqrt(x*x+y*y); theta=Math.Atan2((double)y,(double)x); } public double R { get{ return r; } set{ value=r;} } public double Theta { get { return theta;} set{ value=theta;} } public double X { get{return (r*Math.Cos(theta));} } public double Y { get { return (r * Math.Sin(theta)); } } private double r; private double theta; }