title: Error: use of 'self' in property
body: <p>i am new to swift. i am doing the exercise in App Development with swift. The class memberwise initializers and reference.</p>
  
  <p>i don't know how to solve the problem. The question is to write your own initializer without providing default values for everything.</p>
  
  <pre><code>class Spaceship {
      let name: String
      var health: Int = 100
      var position: Int = 0
  
      func moveLeft() {
          position -= 1
      }
  
      func moveRight() {
          position += 1
      }
  
      func wasHit() {
          health -= 5
      }
  
      init(name:String, health:Int, position:Int) {
          self.name = name
          self.health = health
          self.position = position
      }
  }
  
  class Fighter: Spaceship {
      let weapon: String
      var remainingFirePower: Int
  
      init(weapon:String,remainingFirePower:Int) {
          self.weapon = weapon
          self.remainingFirePower = remainingFirePower
          super.init(name: name, health: health, position: position)
      }
  
      func fire() {
          if remainingFirePower &gt; 0 {
              remainingFirePower -= 1
          } else {
              print("You have no more fire power.")
          }
      }
  }
  
  class ShieldedShip: Fighter {
      var shieldStrength: Int
  
      override func wasHit() {
          if shieldStrength &gt; 0 {
              shieldStrength -= 5
          } else {
              super.wasHit()
          }
      }
      init(shieldStrength:Int, weapon:String, remainingFirePower:Int){
          self.shieldStrength = shieldStrength
          super.init(weapon:weapon, remainingFirePower:remainingFirePower)
      }
  }
  </code></pre>