標題: | 物件動態型態轉換之理論與應用 A Theory of Dynamic Object Type Transformation and Its Application |
作者: | 姜豐正 Chiang, Feng-Cheng 蘇元良, 羅濟群 Yuan-Liang Su, Chi-Chun Lo 資訊管理研究所 |
關鍵字: | 物件;類別;型態轉換;object;class;type transformation |
公開日期: | 1995 |
摘要: | 在物件導向分析/設計的領域中,類別(Class)與物件(Object)是一體 兩面的關係。每個類別可衍生零個或更多的實例(Instance),也就是物 件;每個物件都是某個類別的實例,而且在物件的生命週期中都屬於該類 別。本文將此種類別與物件的關係視為靜態的關係(static relationship)。相對於此種靜態關係,本文以動態觀點提出另一種類別 與物件的動態關係(dynamic relationship)。何謂類別與物件的動態關 係呢?簡單的說,就是在物件的生命週期中,物件可以改變其所屬型態( 就是類別)。本文中將此種動態關係稱為型態轉換關係(Type Transformation)。型態轉換關係不但改變了類別與物件之間的關係,也 產生新的類別與類別之間的關係。在現實世界中存在許多這種型態轉換的 例子,譬如毛毛蟲會結成蛹,然後破繭而出變成蝴蝶。又如公司員工的職 業生涯中,可能由普通職員升為課長、升為經理、升為協理、升為總經理 等不同的職位。在上述例子中,蝴蝶物件最初屬於卵類別、然後轉換成毛 毛蟲類別、再轉換成蛹類別、最後轉換成蝴蝶類別。而公司員工物件也在 各個職務(類別)間相互轉換。本文主要的目的是探討、分析物件型態轉 換關係的內涵、定義與特性。由於型態轉換與狀態轉換的概念相當接近, 因此也針對型態轉換與狀態轉換(state transition)的差異與應用進行 分析比較,並研究將型態轉換關係應用在物件導向分析/設計的方法、步 驟與優點。本文最後提出 "間接物件型態轉換法",並配合Production rules的使用,以作為實作型態轉換關係的機制。 Classes and objects are separate yet intimately related concepts. Specifically, every object is the instance of some class during its life, and every class has zero or more instances. Our study thought that the relationship between classes and objects is static. The thesis points out that there is another dynamic relationship between classes and objects. What does the dynamic relationship mean? It means that objects may transform the their types(classes) in lifetime, and type transformation is defined for the dynamic relationship between classes and objects. The type transformation differs from any other relationship, it means the new relationship between classes and objects.There are some examples of type transformation in the real world. For example, the caterpillar transforms to pupa, then transforms to butterfly. And the employee may change his position from clerk to manager. In the example of butterfly, the object (butterfly) is the instance of ovum class at first. Then it transforms to be instance of caterpilla class, then transforms to be instance of pupa class, and finally transforms to be instance of butterfly class. In the example of employee, the employee may transform from one class( position) to another class(position).The purpose of this thesis is to study the properties of type transformation, and gives a definition to type transformation. In the thesis, we also introduce the concept of type transformation in analysis and design phases. Finally, we discuss the problems caused by the type transformation, and propose one mechanism to implement type transformation and solve the problems. |
URI: | http://140.113.39.130/cdrfb3/record/nctu/#NT840396016 http://hdl.handle.net/11536/60548 |
Appears in Collections: | Thesis |