static void Main(string[] args) { Ifactory factory = new UndergraduateFactory(); Nightingale student = factory.CreateNiahtingale(); student.BuyRice(); student.Sweep(); student.Wash(); }
static void Main(string[] args) { IFactory factory = new UngraduateFactory(); Nightingale Student = factory.CreateNightingale(); Student.Sweep(); Student.Wash(); Student.BuyRice(); Console.Read(); }