Exemplo n.º 1
0
        public static ICar ToyotaCorolla()
        {
            IWheel frontLeft  = new Wheel();
            IWheel frontRight = new Wheel();

            return(new Car(frontLeft, frontRight, new Wheel(), new Wheel(),
                           new FrontSteering(frontLeft, frontRight),
                           new TwoWheelDrive(frontLeft, frontRight), Toyota.GetInstance(),
                           "Corolla"));
        }
Exemplo n.º 2
0
 public ToyotaCorolla()
 {
     this.FrontLeft    = new Wheel();
     this.FrontRight   = new Wheel();
     this.RearLeft     = new Wheel();
     this.RearRight    = new Wheel(0, 0);
     this.Steering     = new FrontSteering(this.FrontLeft, this.FrontRight);
     this.Driving      = new TwoWheelDrive(this.FrontLeft, this.FrontRight);
     this.Manufacturer = Toyota.GetInstance();
 }