/// <summary> /// /// </summary> /// <param name="other"></param> /// <returns></returns> public bool Equals(RightCircularCylinder other) { return other != null && (_circleBase == other._circleBase && Math.Abs(_height - other._height) < 1); }
/// <summary> /// /// </summary> /// <param name="other"></param> /// <returns></returns> public bool Equals(RightCircularCylinder other) { return(other != null && (_circleBase == other._circleBase && Math.Abs(_height - other._height) < 1)); }
public void RightCircularCylinderTest() { RightCircularCylinder rightCircularCylinder = new RightCircularCylinder(3, 4); Assert.AreEqual(3, rightCircularCylinder.Radius); Assert.AreEqual(4, rightCircularCylinder.Height); Assert.AreEqual(113.097336, Math.Round(rightCircularCylinder.Volume, 6)); Assert.AreEqual(131.946891, Math.Round(rightCircularCylinder.SurfaceArea, 6)); RightCircularCylinder rightCircularCylinder2 = new RightCircularCylinder(3, 4); Assert.AreEqual(rightCircularCylinder, rightCircularCylinder2); }