占星生活大師─星討論區
占星生活大師─星討論區
首頁 | 個人資料 | 最新文章 | 主題統計 | 會員 | 搜尋 | FAQ | �樨^中文
 所有討論區
 熱門命理討論區
 占星學
 [轉帖]以 Object Oriented Programming 的概念看[共盤]

注意: 必須先註冊才可以發表文章

區域:
使用者名稱:
密碼:
模式:
格式: 粗體斜體底線劃線 左對齊中對齊右對齊 水平線 加入連結加入Email連結l加入圖片 加入原文加入引言加入項目符號
   
內文:

* HTML語法關閉
* 論壇代碼語法開啟
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

主題回顧
Robert 發表於 - 09/26/2004 : 8:44:45 PM
資料來源: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");
}
}

哈哈~~ 有趣有趣~~


   最近回文    1篇    (由新而舊)
Robert 發表於 - 09/26/2004 : 8:45:11 PM
雙胞胎~~

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
自訂搜尋