/// <summary> /// Constructor for a default car /// </summary> public Car() { Horn = new Horn(Sound.train); Engine = new Engine(); Wheels[0] = new Wheel(); Wheels[1] = new Wheel(); Wheels[2] = new Wheel(); Wheels[3] = new Wheel(); }
/// <summary> /// Constructor for a custom car /// </summary> /// <param name="engineFuel">string containing a fueltype</param> /// <param name="s">The sound as defined in the Soud enum</param> /// <param name="wheels">An array containing all the wheels</param> public Car(string engineFuel, Sound s, Wheel[] wheels) { Engine = new Engine(engineFuel); Horn = new Horn(s); Wheels = wheels; }