Post

面向对象

  • 封装:定义结构体,定义方法,接收者为该结构体
  • 继承:通过结构体嵌套实现,也可以重写父类方法
  • 多态:定义接口方法,子类实现了接口所定义的接口
This post is licensed under CC BY 4.0 by the author.