面向对象技术特征及数据抽象.pptVIP

  • 10
  • 0
  • 约1.65万字
  • 约 71页
  • 2018-05-14 发布于四川
  • 举报
2. 数据抽象 2.3 抽象数据类型 实际上,语言中的基本类型本身就是 ADT。例如浮点数类型(float,double,long double): Information about the storage is hidden from the user. Modification of information is only through the assignment operator – you can’t modify the information at the bit-level. Operations on it is only through the predefined arithmetic operations. * 2. 数据抽象 2.3 抽象数据类型 但是,并不是所有语言都支持用户自定义 ADT。 首先支持用户自定义 ADT 的语言是 Ada。 目前的面向对象程序设计语言的标志之一,就是允许用户以各语言特定的方式定义自己所需的 ADT。 * 2. 数据抽象 2.3 抽象数据类型(例:Stack) 在设计这个ADT时,我们应当具有关于堆栈的一般知识: 抽象操作: create : void ? Stack destroy : Stack ? void is_empty : Stack ? bool * top : Stack ? Eleme

文档评论(0)

1亿VIP精品文档

相关文档