數位坑(罹患倉鼠症末期)
2016-11-03T02:58:20.000Z
睡過頭好厲害啊!XD
latest #10
數位坑(罹患倉鼠症末期)
2016-11-03T03:28:30.000Z
Object:An object is characterized by a number of operations and a state which remembers the effect of these operations.
數位坑(罹患倉鼠症末期)
2016-11-03T03:28:41.000Z
Class:A class represents a template for several objects and describes how these objects are structured internally.
數位坑(罹患倉鼠症末期)
2016-11-03T03:28:43.000Z
Objects of the same class have the same definition both for their operations and for their information structures.
立即下載
數位坑(罹患倉鼠症末期)
2016-11-03T03:28:57.000Z
Instance:An instanceis an object created from a class. The class describes the (behavior and information)structure of the instance,operations performed on the instance.
數位坑(罹患倉鼠症末期)
2016-11-03T03:28:58.000Z
while the current state of the instance is defined by the
數位坑(罹患倉鼠症末期)
2016-11-03T03:29:15.000Z
operations performed on the instance
數位坑(罹患倉鼠症末期)
2016-11-03T03:29:59.000Z
資料成員(data members)和屬性(attributes)是同義詞,都是用來儲存物件的狀態。如果一個class沒有任何資料成員,這個class所產生的所有objects看起來就會是一模一樣的東西。也就是說,可以把一個沒有狀態的class變成一個static class,不用產生任何instance就可以呼叫該class的operations。
jdoe
2016-11-07T11:26:01.000Z
(dice20)
jdoe
2016-11-07T11:26:25.000Z
(dice)
jdoe 分享
2016-11-07T11:27:17.000Z
back to top