public static Automobile getInstance(Engine eng, Kuzov kuz, string fac) { if (instance == null) { instance = new Automobile(eng, kuz, fac); } return(instance); }
public void CreateAutomobile(Engine eng, Kuzov kuz, string fac) { Automobile = Automobile.getInstance(eng, kuz, fac); Automobile.Engine.Show(); Console.WriteLine(Automobile.Kuzov.ToString(), Automobile.Factory); }