欢迎来到毕设资料网! | 帮助中心 毕设资料交流与分享平台
毕设资料网
全部分类
  • 毕业设计>
  • 毕业论文>
  • 外文翻译>
  • 课程设计>
  • 实习报告>
  • 相关资料>
  • ImageVerifierCode 换一换
    首页 毕设资料网 > 资源分类 > DOC文档下载
    分享到微信 分享到微博 分享到QQ空间

    计算机科学与技术外文翻译--详细解析Java中抽象类和接口的区别

    • 资源ID:133300       资源大小:70.50KB        全文页数:12页
    • 资源格式: DOC        下载积分:100金币
    快捷下载 游客一键下载
    账号登录下载
    三方登录下载: QQ登录
    下载资源需要100金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。

    计算机科学与技术外文翻译--详细解析Java中抽象类和接口的区别

    1、Parsing Java Abstraction of the Difference Between Classes and Interfaces In Java language, abstract scale-up and with support class abstraction definition of two mechanisms. Because of these two kinds of mechanism of existence, just gives Java powerful object-oriented skills. Abstract scale-up and

    2、with between classes abstraction definition for support has great similarities, even interchangeable, so many developers into line non-abstract class definition for abstract scale-up and it is becoming more casual with choice. In fact, both between still has the very big difference, for their choice

    3、 even reflected in problem domain essence of understanding, to design the intentions of the understanding correctly and reasonable. This paper will for the difference analysis, trying to give a developer with a choice between them are based. Understand class abstraction Abstract class and interface

    4、in Java language is used for abstract classes (in this article non-abstract class not from abstract scale-up translation, it represents an abstract body, and abstract scale-up for Java language used to define class abstraction in one way, please readers distinguish) defined, then what are the abstra

    5、ct classes, use abstract classes for us any good? In object-oriented concept, we know all objects is through class to describe, but in turn not such. Not all classes are used to describe object, if a class does not contain enough information to portray a concrete object, this class is abstract class

    6、es. Abstract classes are often used to characterization of problem field in our analysis, design that the abstract concepts, is to the series will look different, but essentially the same exact conception of abstraction. For example: if we carry out a graphical editing software development, will fin

    7、d problem domain exists round, triangle so some specific concept, they are different, but they all belong to shape such a concept, shape this concept in problem domain is not exist, it is an abstract concept. Precisely because the abstract concepts in problem field no corresponding specific concept,

    8、 so to characterization abstract concepts non-abstract class cannot be instantiated. In an object-oriented field, mainly used for class abstraction types hidden. We can construct a fixed a group of behavior of abstract description, but this group of behavior but can have any a possible concrete impl

    9、ementation. This abstract describe is abstract classes, and this an arbitrary a possible concrete realization is behaved for all possible derived class. Modules can be operating an abstract body. Due to the module dependent on a fixed abstraction body, so it can are not allowed to modify, Meanwhile,

    10、 through the abstract derived from the body, also can expand the behavior of this module function. Familiar with OCP readers must know, object-oriented design to be able to achieve a core principle OCP (Open - Closed flying), class abstraction is one of the key. From the perspectives of grammar defi

    11、nition abstract class and interface In grammatical perspective, Java language for abstract scale-up and with gives different definitions below to define a way, called produce professional Demo abstract class as an example to illustrate the difference. In the abstract scale-up manner, produce profess

    12、ional Demo can have their own data members, also can have the members of the abstract method, and with the realization of the way, produce professional Demo can have only static cannot be modified data members, all the members of the methods is abstract. In a sense, with a special kind of abstract c

    13、lass. From programming, from the perspective of abstract scale-up and with can be used to achieve cancel thoughts make themselves. But in the specific use top still have some difference. First, abstract class in Java language suggests is a kind of inheriting relationship, a class can be used only on

    14、ce inheritance relationship (because Java do not support more inheritance ZhuanZhu). - However, a class but can implement multiple with. Maybe it is Java language designers in considering Java for multiple inheritance support of a compromise to consider it. Secondly, in the definition of abstract sc

    15、ale-up, we may give methods of default behavior. But in with the definition of method cannot have the default behavior, to bypass this limits, must use entrust, but it will add some complexity, sometimes can cause a lot of trouble. In class abstraction cannot define the default behavior is there ano

    16、ther serious problem that may cause on the maintenance of trouble. Because if later want to modify the interface (usually by such abstract scale-up or with to represent) to adapt to the new situation (e.g., adding new methods or to have already used the method to add new parameters), will be very tr

    17、oublesome, might spend a lot of time (for a derived class many situation, especially). But if the interface is through scale-up abstract to realize, then may just need to modify defined in the abstract scale-up default behavior is ok. Similarly, if not in abstract class defined in the default behavi

    18、or, can lead to the same method to appear in the abstract class every a derived class, violated a-one rule, principle, causing a-one place, the same code duplication against future maintenance. Therefore, in the abstract scale-up and with a choice between should be careful. From the design concept w

    19、ith abstract class and interface It mainly from grammar definition and programming perspective, this paper discusses the area with abstract class and dont, these levels difference is relatively low levels of, the essence. This section will from another level: abstract class and with reflected design

    20、 concept, analyst the difference. The author thinks that from this level analysis to understand the essence of both concepts. As already mentioned, abstract class in Java language reveals a kind of inheriting relationship, want to make reasonable, the inheritance relationship between parent class an

    21、d derived class must exist is - a relations, namely the super class and derived class in concept in essence should be the same. For with criterion otherwise, it does not require with of implementers and with defined in concept is essentially a consistent, only is realized with defined a contract is

    22、just. In order to facilitate understandings. Consider such a example, suppose in our problem field has a about filled the abstract concepts, this filled with executive two movements open and close, then we can through scale-up or abstract with to define a said the abstract concept of type, define ea

    23、ch pattern . Other concrete filled type can use extends the abstract class defined or filled with defined using implements the filled. Look like using abstract class and with no much difference. If now requires more filled with alarm function. How can we design according to the example of the class hierarchy? (in this case, it is mainly to show abstract class and with


    注意事项

    本文(计算机科学与技术外文翻译--详细解析Java中抽象类和接口的区别)为本站会员(泛舟)主动上传,毕设资料网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请联系网站客服QQ:540560583,我们立即给予删除!




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们
    本站所有资料均属于原创者所有,仅提供参考和学习交流之用,请勿用做其他用途,转载必究!如有侵犯您的权利请联系本站,一经查实我们会立即删除相关内容!
    copyright@ 2008-2025 毕设资料网所有
    联系QQ:540560583