¥e¬P¥Í¬¡¤j®v¢w¬P°Q½×°Ï
¥e¬P¥Í¬¡¤j®v¢w¬P°Q½×°Ï
­º­¶ | ­Ó¤H¸ê®Æ | ³Ì·s¤å³¹ | ¥DÃD²Î­p | ·|­û | ·j´M | FAQ | ŠéÊ^¤¤¤å
¨Ï¥ÎªÌ¦WºÙ¡G
±K½X¡G
°O¦í±K½X  
§Ñ°O§Aªº±K½X¡H

 ©Ò¦³°Q½×°Ï
 ¼öªù©R²z°Q½×°Ï
 ¥e¬P¾Ç
 [Âà©«]¥H Object Oriented Programming ªº·§©À¬Ý[¦@½L]
 µoªí¤å³¹  ¦^À³¤å³¹
 ¤Íµ½¦C¦L
§@ªÌ ¤W¤@­Ó¥DÃD ¥DÃD ¤U¤@­Ó¥DÃD  

Robert
ºÞ²z¤H­û

¥xÆW
136 ¤å³¹¼Æ

µoªí©ó - 09/26/2004 :  8:44:45 PM  ­Ó¤H¸ê®Æ  °ÑÆ[ Robertªººô­¶  ¤Þ¨¥¦^ÂÐ
¸ê®Æ¨Ó·½¡Ghttp://destiny.xfiles.to/ubbthreads/showflat.php?Cat=0&Number=680600&page=9&view=collapsed&sb=5&o=14&fpart=1#680600

¬ðµo©_·Q~~

¸Õ¥H Object Oriented Programming ªº·§©À¬Ý[¦@½L]¡C

©R½L¬O abstract class, ©R¥D¬O implementation ¡C

°²³]©R½L¦³ 30 ¸U­Ó¡M«h¦³ 30 ¸U­Ó abstract class ¡C

°²³]¬Y¬P²y¦³ 30 »õ¤H¡M«h¥­§¡¨C­Ó©R½L¦³ 1 ¸U­Ó implementation ¡C

¬JµM 1 ¸U­Ó implementation ·½¦Û¦P¤@­Ó abstract class¡M ·íµM¥L­Ì¬O¦³¦@¦PÂIªº¡C

ÁöµM¦p¦¹¡M¥L­Ì¤]¦³¤£¦PÂI¡M¦]¬° implementation ¥i¥H¿ï¾Ü©Êªº implement abstract methods, ¤S©Î²ª½¤£ implement ¬Y¨Ç method , ¤£¦Pªº implementation §ó¥i¥H¥Î¤£¦Pªº¤èªk (¤÷¥À¤£¦P¡M¤jÀô¹Ò¤£¦P) ¨Ó implement ¦P¤@­Ó method ¥H¤Î¥[¤J¦Û¤vªº private protected methods ¡C

¤@­Ó class ³Q³]­p¦n¤F¡M­n compile (¥¥¨|) ¦¨¥\ (¥X¥@) ¤~¦³¥Î¡C¦p compiler (¥ÀÅé) ¦³°ÝÃD¡M¤S©Î version (¦~¥÷) ¤£¤@¼Ë¡M«h·|¼vÅT final implementation ªº¯À½è¡M¦³ bug ´N·íµM¦³¯Ê³´¤F¡C

¸Õ°µ³nÅé (¤HÅé) ³]­p~~

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 (©R¥D)
extends LifeChartPattern_001 (abstract class)
implements Mother, Father (¤÷¥À)
{
public Lincoln() (¤jÀô¹Ò³]©w)
{
setPlanet("Earth");
setContinent("North America");
setCountry("United States of America");
setEnvironment("Democratic, Capitalism, 2004");
}
}

«¢«¢~~ ¦³½ì¦³½ì~~


Robert
ºÞ²z¤H­û

¥xÆW
136 ¤å³¹¼Æ

µoªí©ó - 09/26/2004 :  8:45:11 PM  ­Ó¤H¸ê®Æ  °ÑÆ[ Robertªººô­¶  ¤Þ¨¥¦^ÂÐ
Âù­M­L~~

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 { }

¦^³Ì¤W¤è
  ¤W¤@­Ó¥DÃD ¥DÃD ¤U¤@­Ó¥DÃD  
 µoªí¤å³¹  ¦^À³¤å³¹
 ¤Íµ½¦C¦L
¸õªO:
¥e¬P¥Í¬¡¤j®v¢w¬P°Q½×°Ï © Copyright 2006 ¥e¬P¥Í¬¡¤j®v ªð¦^³Ì¤W
­¶­±²£¥Í®É¶¡: 0.12 ¬í Snitz Forums 2000
自訂搜尋