public static IKitchen GetCook(CookName CookName) { IKitchen kitchen = null; switch (CookName) { case CookName.鱼香肉丝: kitchen = new YXRSCook(); break; case CookName.宫保鸡丁: kitchen = new GBJDCook(); break; default: break; } return(kitchen); }
public override IKitchen CreateCook() { IKitchen kitchen = new GBJDCook(); return(kitchen); }