Exemplo n.º 1
0
        static void Main(string[] args)
        {
            // Test Program for Lab401
            Circle c1 = new Circle(), c2 = new Circle(1.5, 5.0, 2), c3 = new Circle(c2);
            Console.WriteLine(c1 + "\n" + c2 + "\n" + c3);

            Cylinder cl1 = new Cylinder(), cl2 = new Cylinder(c3), cl3 = new Cylinder(1, 1, 3, 4);
            Cylinder cl4 = new Cylinder(cl3);
            Console.WriteLine(cl1 + "\n" + cl2 + "\n" + cl3 + "\n" + cl4);
        }
Exemplo n.º 2
0
 public Cylinder(Circle a)
     : base(a.X,a.Y,a.Radius)
 {
     Height = 1.0;
 }
Exemplo n.º 3
0
 public Circle(Circle a)
     : base(a.x, a.y)
 {
     Radius = a.radius;
 }