package main.count//定义抽象类
abstract class Abs1{def a ()def b ()def c (): Unit ={println("cc")}
}//定义接口1
trait tra1{def t1()
}
//定义接口2
trait tra2{def t2(){println("t2t2t2")}
}class AbstractText5 extends Abs1 with tra1 with tra2 { //继承父类 实现俩接口override def a(): Unit = {println("aaa")}override def b(): Unit = {
println("bbb")}override def c(): Unit = { //重新了c()
println("ccc")}//自己定义接口1override def t1(): Unit = {println("t1t1t1")}//定义好的接口2直接用t2()}object AbstractText5 extends App{val abs=new AbstractText5()abs.a()abs.b()abs.c()abs.t1()abs.t2()
}