I'm getting the concept of reducing consultants, but I did not know that these two special constructors together, therefore I appreciate it if someone can help me
constructor
// default constructor // Objective: to minimize data members Start / Parameters for: None // Returns: Any Public Line () {startPoint.xCoord = 0; StartPoint.yCoord = 0; EndPoint.xCoord = 0; EndPoint.yCoord = 0; } // Parametragged Constructor // Purpose: Start the data for P1 and P2 parameters to the members: Points and P2 / Returns: Any public line (Point P1, Point P2) {startPoint = p1 ; End Point = P2; }
public line (): this (new point (), new Point ()) {}
No comments:
Post a Comment