private static void Main(string[] args) { Car car1 = new Car(); IFactory factory = new SolarFactory(); car1.Engine = factory.GetEngine(); car1.Dynamo = factory.GetDynamo(); car1.Drive(); Console.ReadLine(); }