示例#1
0
 public AutoFlexibel()
 {
     this.Speed = 0;
     this.CommentSpeed();
     this.motor  = new MotorSchwach();
     this.bremse = new BremseSchwach();
 }
示例#2
0
 public Fahrzeug(IMotor motor, IBremse bremse, IAudioSystem audioSystem)
 {
     this.motor       = motor;
     this.bremse      = bremse;
     this.audioSystem = audioSystem;
 }
示例#3
0
 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));
 }