public static Cake Buy(string strCakeType) { Cake cake = null; if (strCakeType.Equals("BlackForest")) { cake = new BlackForestCake(); } if (strCakeType.Equals("Angle")) { cake = new AngleCake(); } return cake; }
public static Cake Buy(string strCakeType) { Cake cake = null; if (strCakeType.Equals("BlackForest")) { cake = new BlackForestCake(); } if (strCakeType.Equals("Angle")) { cake = new AngleCake(); } return(cake); }