Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Cuboid cuboid = new Cuboid();

            double volumeOfCuboid = cuboid.CalculateVolume(10, 15);

            Console.WriteLine(volumeOfCuboid);

            Cylinder Cylinder = new Cylinder();

            double volumeOfCylinder = Cylinder.CalculateVolume(10, 10);

            Console.WriteLine(volumeOfCylinder);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Shape cube = new Cuboid();

            Cuboid cuboid = new Cuboid();

            double cuboidVolume = cuboid.CalculateVolume(10, 10);

            Console.WriteLine($"Cuboid volume is {cuboidVolume}");

            Cylinder cylinder = new Cylinder();

            double cylinderVolume = cylinder.CalculateVolume(10, 10);

            Console.WriteLine($"Cylinder volume is {cylinderVolume}");
        }