title: Must override val variable in scala
body: <p>I meet a weird problem in scala. Following is my code, class Employee extends class Person</p>
  
  <p>But this piece of code can not been compiled, I have explicit define firstName and lastName as val variable. Why is that ? Does it mean I have to override val variable in base class ? And what is the purpose ?</p>
  
  <pre><code>class Person( firstName: String,  lastName: String) {
  
  }
  
  class Employee(override val firstName: String, override val lastName: String, val depart: String)
      extends Person(firstName,lastName){
  
  } 
  </code></pre>