public AutoFlexibel() { this.Speed = 0; this.CommentSpeed(); this.motor = new MotorSchwach(); this.bremse = new BremseSchwach(); }
public Fahrzeug(IMotor motor, IBremse bremse, IAudioSystem audioSystem) { this.motor = motor; this.bremse = bremse; this.audioSystem = audioSystem; }
public Auto(IBremse bremse, IMotor motor, IAudioSystem audioSystem) { this.bremse = bremse ?? throw new ArgumentNullException(nameof(bremse)); this.motor = motor ?? throw new ArgumentNullException(nameof(motor)); this.audioSystem = audioSystem ?? throw new ArgumentNullException(nameof(audioSystem)); }