Exemple #1
0
        //button for cyllinder

        private void btnCyllinder_Click(object sender, EventArgs e)
        {
            Random    rand = new Random();
            double    rad  = rand.Next(2, 20);
            double    hei  = rand.Next(2, 20);
            Cyllinder cyl  = new Cyllinder(rad, hei);

            Display(cyl);
        }
 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);
 }
Exemple #4
0
 public void Visit(Cyllinder cyllinder)
 {
     Console.WriteLine($"Draw cyllinder with height {cyllinder.Height} and raduis {cyllinder.Radius}");
 }