title: How to override private var in superclass
body: <p>So I have the following superclass:</p>
  
  <pre><code>class Vehicle {
  
      private var _maxSpeed: Int = 100
  
      var maxSpeed: Int {
          get {
              return _maxSpeed
          }
  
  var tooFast: Bool {
          get {
              if maxSpeed &gt;= 140 {
                  return false
              } else {
                  return true
              }
          }
      }
  }
  </code></pre>
  
  <p>Plus I have some subclasses in which I want to override maxSpeed... per example:</p>
  
  <pre><code>class SuperCar: Vehicle {
  //override the maxspeed...
  
  }
  </code></pre>
  
  <p>But how should I approach this? Or is this only possible if we don't make it private? I tried to throw the private part out of the window but that won't work as well...</p>
  
  <pre><code>class Vehicle {
  
      var maxSpeed: Int = 100
  
  var tooFast: Bool {
          get {
              if maxSpeed &gt;= 140 {
                  return false
              } else {
                  return true
              }
          }
      }
  }
  
  class SuperCar: Vehicle {
  // override the maxSpeed...
  override var maxSpeed: Int = 200
  // Will not work...
  }
  </code></pre>