Use of the class Point in a client class called Application. | Lecture 3 - slide 25 : 29 Program 2 |
using System; public class Application{ private static Point p0; // Initialized to null public static void Main(){ Point p1, // NOT initialized p2 = new Point(1.1, 2.2); p0 = p1 = p2; p2.Move(3.3, 0); Console.WriteLine("{0} {1} {2}", p0, p1, p2); } } | Dynamic instantiation of class Point. A Point is created when the new operator is executed. |