Chapter 10 Abstract Classes and Interfaces.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Chapter 10 Abstract Classes and Interfaces.ppt

Liang, Introduction to Java Programming, Sixth Edition, c 2007 Pearson Education, Inc. All rights reserved. 0-13-222158-6 Chapter 10 Abstract Classes and Interfaces Objectives To design and use abstract classes §10.2 . To process a calendar using the Calendar and GregorianCalendar classes §10.3 . To declare interfaces to model weak inheritance relationships §10.4 . To define a natural order using the Comparable interface §10.4.1 . To know the similarities and differences between an abstract class and an interface §10.4.2 . To declare custom interfaces §10.4.3 . Optional To enable objects cloneable using the Cloneable interface §10.4.4 . To use wrapper classes Byte, Short, Integer, Long, Float, Double, Character, and Boolean to wrap primitive data values into objects §10.5 . Optional To use the BigInteger and BigDecimal classes for computing very large numbers with arbitrary precisions §10.5.6 . To create a generic sort method §10.5 . To simplify programming using JDK 1.5 automatic conversion between primitive types and wrapper class types §10.6 . Optional GUI To handle GUI events §10.7 . The abstract Modifier The abstract class Cannot be instantiated Should be extended and implemented in subclasses The abstract method Method signature without implementation From Chapter 9 Abstract Classes NOTE NOTE NOTE NOTE NOTE NOTE Example: Using the GeometricObject Class Objective: This example creates two geometric objects: a circle, and a rectangle, invokes the equalArea method to check if the two objects have equal area, and invokes the displayGeometricObject method to display the objects. The Abstract Calendar Class and Its GregorianCalendar subclass The Abstract Calendar Class and Its GregorianCalendar subclass An instance of java.util.Date represents a specific instant in time with millisecond precision. java.util.Calendar is an abstract base class for extracting detailed information such as year, month, date, hour, minute and second from a Date obje

文档评论(0)

gshbzl + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档