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; }
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); }