/// <summary> /// Comparison one figure with another. /// </summary> /// <param name="obj">Comparer parameter.</param> /// <returns>Return "true" if equal and "false" if not equal.</returns> public override bool Equals(Object obj) { if (obj == null || GetType() != obj.GetType()) { return(false); } BaseRectangleShape r = (BaseRectangleShape)obj; return(Length.Equals(r.Length) && Width.Equals(r.Width)); }
/// <summary> /// Constructor to cut shape from another. /// </summary> /// <param name="currentShape">Shape's blank.</param> /// <param name="cuttingShape">Cut out shape.</param> public BaseRectangleShape(BaseRectangleShape currentShape, BaseRectangleShape cuttingShape) : base(currentShape, cuttingShape) { UserException.AreaCutting(currentShape, cuttingShape); }