占星生活大師─星討論區
占星生活大師─星討論區
首頁 | 個人資料 | 最新文章 | 主題統計 | 會員 | 搜尋 | FAQ | �樨^中文
使用者名稱:
密碼:
記住密碼  
忘記你的密碼?

 所有討論區
 熱門命理討論區
 占星學
 [轉帖]以 Object Oriented Programming 的概念看[共盤]
 發表文章  回應文章
 友善列印
作者 上一個主題 主題 下一個主題  

Robert
管理人員

台灣
136 文章數

發表於 - 09/26/2004 :  8:44:45 PM  個人資料  參觀 Robert的網頁  引言回覆
資料來源:http://destiny.xfiles.to/ubbthreads/showflat.php?Cat=0&Number=680600&page=9&view=collapsed&sb=5&o=14&fpart=1#680600

突發奇想~~

試以 Object Oriented Programming 的概念看[共盤]。

命盤是 abstract class, 命主是 implementation 。

假設命盤有 30 萬個﹐則有 30 萬個 abstract class 。

假設某星球有 30 億人﹐則平均每個命盤有 1 萬個 implementation 。

既然 1 萬個 implementation 源自同一個 abstract class﹐ 當然他們是有共同點的。

雖然如此﹐他們也有不同點﹐因為 implementation 可以選擇性的 implement abstract methods, 又或簡直不 implement 某些 method , 不同的 implementation 更可以用不同的方法 (父母不同﹐大環境不同) 來 implement 同一個 method 以及加入自己的 private protected methods 。

一個 class 被設計好了﹐要 compile (孕育) 成功 (出世) 才有用。如 compiler (母體) 有問題﹐又或 version (年份) 不一樣﹐則會影響 final implementation 的素質﹐有 bug 就當然有缺陷了。

試做軟體 (人體) 設計~~

interface Planet { }
interface Continent { }
interface Country { }
interface Environment { }
interface Mother { }
interface Father { }
abstract class LifeChartPattern_001 { }
abstract class LifeChartPattern_002 { }
abstract class LifeChartPattern_003 { }
...
...
abstract class LifeChartPattern_098 { }
abstract class LifeChartPattern_099 { }
abstract class LifeChartPattern_100 { }

public class Lincoln (命主)
extends LifeChartPattern_001 (abstract class)
implements Mother, Father (父母)
{
public Lincoln() (大環境設定)
{
setPlanet("Earth");
setContinent("North America");
setCountry("United States of America");
setEnvironment("Democratic, Capitalism, 2004");
}
}

哈哈~~ 有趣有趣~~


Robert
管理人員

台灣
136 文章數

發表於 - 09/26/2004 :  8:45:11 PM  個人資料  參觀 Robert的網頁  引言回覆
雙胞胎~~

abstract class Twins
extends LifeChartPattern_088
implements Mother, Father
{
public Twins()
{
setPlanet("Earth");
setContinent("North America");
setCountry("United States of America");
setEnvironment("Democratic, Capitalism, 2004");
}
}

public class Lincoln extends Twins { }
public class Clinton extends Twins { }

回最上方
  上一個主題 主題 下一個主題  
 發表文章  回應文章
 友善列印
跳板:
占星生活大師─星討論區 © Copyright 2006 占星生活大師 返回最上
頁面產生時間: 0.02 秒 Snitz Forums 2000
自訂搜尋