예제 #1
0
 public Car(string model, string vendor, Engine engine = null, Door leftdoor = null, Door rightdoor = null, Wheels wheels = null)
 {
     Model     = model;
     Vendor    = vendor;
     Engine    = engine;
     LeftDoor  = leftdoor;
     RightDoor = rightdoor;
     Wheels    = wheels;
 }
예제 #2
0
 public CarBuilder SetWheels(Wheels wheels)
 {
     car.Wheels = wheels;
     return(this);
 }
예제 #3
0
 public void SetWheels(Wheels wheels)
 {
     _car.Wheels = wheels;
 }
예제 #4
0
 public override string ToString()
 {
     return($"[Board:{Board}, Wheel Type:{Wheels.First()}, Number of wheels:{Wheels.Count()}, Number of motors:{NumberOfMotors}]");
 }