public void BeCorrectForCyllinder() { var body = new Cyllinder { Radius = 2, Height = 3 }; Assert.AreEqual(20 * Math.PI, body.GetSurfaceArea(), 1e-7); }
public void BeCorrectForCyllinder() { var body = new Cyllinder { Radius = 2, Height = 3 }; var dimensions = body.GetDimensions(); Assert.AreEqual(4, dimensions.Width, 1e-7); Assert.AreEqual(3, dimensions.Height, 1e-7); }
public void Visit(Cyllinder cyllinder) { Dimensions = new Dimensions(2 * cyllinder.Radius, cyllinder.Height); }
public void Visit(Cyllinder cyllinder) { SurfaceArea = 2 * Math.PI * cyllinder.Radius * (cyllinder.Height + cyllinder.Radius); }
public void Visit(Cyllinder body) { SurfaceArea = 2 * Math.PI * body.Radius * (body.Height + body.Radius); }
public void Visit(Cyllinder body) { Dimensions = new Dimensions(body.Radius * 2, body.Height); }
/// <summary> /// Посетить цилиндр для рассчета /// ширины и высоты /// </summary> /// <param name="cyllinder"> /// Цилиндр для рассчетов /// </param> public void Visit(Cyllinder cyllinder) { this.Dimensions = new Dimensions(cyllinder.Radius * 2, cyllinder.Height); }
public void Visit(Cyllinder cyllinder) { cyllinder.Volume = Math.PI * Math.Pow(cyllinder.Radius, 2) * cyllinder.Height; }
public double Visit(Cyllinder cyllinder) { return(Math.PI * Math.Pow(cyllinder.Radius, 2) * cyllinder.Height); }
public void Visit(Cyllinder cyllinder) { SurfaceArea = 2 * Math.PI * cyllinder.Radius * cyllinder.Height; SurfaceArea += 2 * Math.PI * Math.Pow(cyllinder.Radius, 2); }
public Dimensions Calc(Cyllinder cyllinder) { return(new Dimensions(2 * cyllinder.Radius, cyllinder.Height)); }