public abstract void Input();
public abstract void Output();
public override void Input()
x = int.Parse(Console.ReadLine());
y = int.Parse(Console.ReadLine());
public override void Output()
Console.WriteLine("x = {0}, y = {1}", x, y);
public override void Input()
x = int.Parse(Console.ReadLine());
y = int.Parse(Console.ReadLine());
z = int.Parse(Console.ReadLine());
public override void Output()
Console.WriteLine("x = {0}, y = {1}, z = {2}", x, y, z);
private static int bottom;
private static int right;
private static RectangularArea instance = null;
private RectangularArea()
public static RectangularArea GetInstance
instance = new RectangularArea();
Console.WriteLine("Boundaries Top {0}, Bottom {1} Left {2} Right {3}", top, bottom, left, right);
public static void Main(string[] args)
RectangularArea area = RectangularArea.GetInstance;
Console.Write("Enter number of points: ");
int n = int.Parse(Console.ReadLine());
Point[] points = new Point[n];
for (int i = 0; i < n; i++)
Console.Write("Enter point type (2D/3D): ");
string type = Console.ReadLine();
points[i] = new Point2D();
points[i] = new Point3D();
for (int i = 0; i < n; i++)