public static Coat CreateCoat(string coatType)
        {
            Coat coat = null;
            switch (coatType)
            {
                case "Business":
                    coat = new BusinessCoat();
                    break;
                case "Casual":
                    coat = new CasualCoat();
                    break;
                default:
                    break;
            }

            return coat;
        }
Пример #2
0
        public static Coat CreateCoat(string coatType)
        {
            Coat coat = null;

            switch (coatType)
            {
            case "Business":
                coat = new BusinessCoat();
                break;

            case "Casual":
                coat = new CasualCoat();
                break;

            default:
                break;
            }

            return(coat);
        }