public void BeCorrectForCyllinder()
        {
            var body = new Cyllinder {
                Radius = 2, Height = 3
            };

            Assert.AreEqual(20 * Math.PI, body.GetSurfaceArea(), 1e-7);
        }
Esempio n. 2
0
        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);
 }
Esempio n. 5
0
 public void Visit(Cyllinder body)
 {
     SurfaceArea = 2 * Math.PI * body.Radius * (body.Height + body.Radius);
 }
Esempio n. 6
0
 public void Visit(Cyllinder body)
 {
     Dimensions = new Dimensions(body.Radius * 2, body.Height);
 }
Esempio n. 7
0
 /// <summary>
 /// Посетить цилиндр для рассчета
 /// ширины и высоты
 /// </summary>
 /// <param name="cyllinder">
 /// Цилиндр для рассчетов
 /// </param>
 public void Visit(Cyllinder cyllinder)
 {
     this.Dimensions = new Dimensions(cyllinder.Radius * 2, cyllinder.Height);
 }
Esempio n. 8
0
 public void Visit(Cyllinder cyllinder)
 {
     cyllinder.Volume = Math.PI * Math.Pow(cyllinder.Radius, 2) * cyllinder.Height;
 }
Esempio n. 9
0
 public double Visit(Cyllinder cyllinder)
 {
     return(Math.PI * Math.Pow(cyllinder.Radius, 2) * cyllinder.Height);
 }
Esempio n. 10
0
 public void Visit(Cyllinder cyllinder)
 {
     SurfaceArea  = 2 * Math.PI * cyllinder.Radius * cyllinder.Height;
     SurfaceArea += 2 * Math.PI * Math.Pow(cyllinder.Radius, 2);
 }
Esempio n. 11
0
 public Dimensions Calc(Cyllinder cyllinder)
 {
     return(new Dimensions(2 * cyllinder.Radius, cyllinder.Height));
 }