Esempio n. 1
0
        static void Main(string[] args)
        {
            var s = CreateShape("square");
            var c = CreateShape("circle");

            WriteLine(GeometricUtilities.ComputeArea(s));
            WriteLine(GeometricUtilities.ComputeArea(c));

            WriteLine(GeometricUtilities.ComputeAreaModernIs(s));
            WriteLine(GeometricUtilities.ComputeAreaModernIs(c));

            WriteLine(GeometricUtilities.ComputeArea_Version3(s));
            WriteLine(GeometricUtilities.ComputeArea_Version3(c));

            var what = CreateShape("       ");

            WriteLine(what);

            var wrong = CreateShape("trapezoid");

            WriteLine(wrong);
        }