下载此文档

java 第十章-课件(PPT讲稿).ppt


文档分类:IT计算机 | 页数:约53页 举报非法文档有奖
1/53
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/53 下载此文档
文档列表 文档介绍
1第十章抽象类和接口 2第一个话题:抽象类 F在类的继承层次中,子类越来越具体, 而父类更加一般化和抽象,类设计过程中应使父类包含子类的一般特征,有时父类太抽象而不能有一个具体的实例, 称为抽象类 3 The abstract Modifier F The abstract class –不能被实例化–在子类中扩展和实现 F The abstract method –方法的标识,无须实现 4一个实例 GeometricObject - color: String - filled: boolean - dateCreated: +GeometricObject() +getColor(): String +setColor(color: String): void +isFilled( ): boolean +setFilled(filled: boolean): void +getDateCreated(): +toString(): String The color of the object (default: white) . Indicates whether the object is filled with a color (default: false) . The date when the object was created. Creates a GeometricObject. Returns the color. Sets a new color. Returns the filled pro perty. Sets a new filled property. Returns the dateCreated. Returns a string representation of this object. Circle - radius : double + Circle () + Circle(radius: double) + get Radius (): double +set Radius ( radius : double ): void +getArea(): double +getPerimeter(): double + getDiameter(): double Rectangle - width : double - height : double + Rectangle () + Rectangle(width: double, height: double) +getWidth(): double +setWidth(width: double): void +getHeight(): double +setHeight(height: double): void +getArea(): double +getPerimeter(): double5 Abstract Classes GeometricObject Circle Rectangle GeometricObject - color: String - filled: boolean - dateCreated: # GeometricObject() +getColor(): String +setColor(color: String): void +isFilled(): boolean +setFilled(filled: boolean): void +getDateCreated(): +toStri ng(): String +getArea(): double +getPerimeter(): double Circle - radius : double + Circle () + Circle(radius: double) + get Radius (): double +set Radius ( radius : double ): void +getDiameter(): double Rectangle - width : double - height : double + Rectangle () + Rectangle(width: double, height: double) +getWidth(): double +setWidth(width: double): void +getHeight(): double +setHeight(height: dou ble): void The # sign indicates

java 第十章-课件(PPT讲稿) 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数53
  • 收藏数0 收藏
  • 顶次数0
  • 上传人2768573384
  • 文件大小0 KB
  • 时间2016-05-28