freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

java的面向對象編程外文資料翻譯-其他專業(yè)-資料下載頁

2025-01-19 06:30本頁面

【導讀】件,從而減少系統(tǒng)運行后可能出現(xiàn)的問題。這些都是令人振奮的可能性。許我們用統(tǒng)一的風格編寫程序,來處理多種已存在的類和特定的相關類。繼承和多態(tài)對于解決軟件的復雜性是一。種有效可行的技術。每個子類本身將來亦可有新的子類,而其本身將成為父類。類是通過從兩級或更多級以上的類繼承而來的。通過多重繼承才能實現(xiàn)的優(yōu)點而沒有關聯(lián)的問題。體并且代表一組更小、更專業(yè)的對象。每個子類對象也是該類的父類的對象。義的小程序同時也被認為是一個Applet的對象。在“是”關系中,子類類型的對象也可以被看作是它的父類型的對象處理?!坝小笔且环N構成。工程的一個至關重要的方面就是子類不能訪問其父類的私有成員。父類中私有成員的改變。類的編寫者應確保由類提供的功能對未來的子類是適用的。在這種情況下,Quadrilateral類是父。類包含了所有的交通工具,如汽車,卡車,船,自行車等。而Car子類僅表示交通。引用的數(shù)組給他們。

  

【正文】 —remember that the subclass normally has more members than the superclass has. Assignment in the other direction is not allowed because assigning a superclass object to a subclass reference would leave the additional subclass members undefined. A reference to a subclass object could be implicitly converted into a reference to a superclass object because a subclass object is a superclass object through inheritance. There are four possible ways to mix and match superclass references and subclass references with superclass objects and subclass objects: 1. Referring to a superclass object with a superclass reference is straightforward. 2. Referring to a subclass object with a subclass reference is straightforward. 3. Referring to a subclass object with a superclass reference is safe, because the subclass object is an object of its superclass as well. Such code can refer only to superclass members. If this code refers to subclassonly members through the superclass reference, the piler will report a syntax error. 4. Referring to a superclass object with a subclass reference is a syntax error. As convenient as it might be to treat subclass objects as superclass objects, and to do this by manipulating all these objects with superclass references, there appears to be a problem. In a payroll system, for example, we would like to be able to walk through an array of employees and calculate the weekly pay for each person. But intuition suggests that using superclass references would enable the program to call only the superclass payroll calculation routine (if indeed there is such a routine in the superclass). We need a way to invoke the proper payroll calculation routine for each object, whether it is a superclass object or a subclass object, and to do this simply by using the superclass reference. Actually,this is precisely how Java behaves and is discussed in this chapter when we consider polymorphism and dynamic binding. We can use inheritance to customize existing software. When we use inheritance to create a new class from an existing class, the new class inherits the attributes and behaviors of an existing class。 then we can add attributes and behaviors or override superclass behaviors to customize the class to meet our needs. It can be difficult for students to appreciate the problems faced by designers and implementers on largescale software projects in industry. People experienced on such projects will invariably state that a key to improving the software development process is encouraging software reuse. Objectoriented programming in general, and Java in particular, certainly does this. It is the availability of substantial and useful class libraries that delivers the maximum benefits of software reuse through inheritance. As interest in Java grows, interest in Java class libraries will increase. Just as shrinkwrapped software produced by independent software vendors became an explosive growth industry with the arrival of the personal puter, so, too, will the creation and sale of Java class libraries. Application designers will build their applications with these libraries, and library designers will be rewarded by having their libraries wrapped with the applications. What we see ing is a massive worldwide mitment to the development of Java class libraries for a huge variety of applications arenas.
點擊復制文檔內容
黨政相關相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1