object AbstractApp {
  def main(args: Array[String]): Unit = {
    val student = new Student2 // Student2 实现了 Person2,所以可以直接new
    println(student.name)
  }
}

/**
  * 类的一个方法或多个方法没有完整的实现(只有定义,没有实现)
  */
abstract class Person2 {
  def speak

  val name: String
  val age : Int

}

class Student2 extends Person2{
  override def speak: Unit = {

  }

  override val name: String = "you name"
  override val age : Int    = 18
}