public static Toyota createToyota() { if (toyota == null) { toyota = new Toyota(); } return(toyota); }
static void Main(string[] args) { Toyota t = Toyota.createToyota(); BMW b = BMW.createBMW(); Console.WriteLine("Call the run() of the Toyota:"); t.run(); Console.WriteLine("Call the run() of the BMW:"); b.run(); }