首选先设计一个
IHuman
{
public string SayName(string ctyname);
}
class ChineseName:IHuman
{
;;;;
}
;;;;;
public statci int Main()
{
ArrayList al=new ArrayList()
al.add().....
;;;;}
IHuman
{
public string SayName(string ctyname);
}
class ChineseName:IHuman
{
;;;;
}
;;;;;
public statci int Main()
{
ArrayList al=new ArrayList()
al.add().....
;;;;}
但是要尽量设计出可重用的代码
class Queue
{
private:
int iLength;
Queue *front;
Queue *Rear;
public:
void InitQue();
BOOL InQUe();
BOOL DeQUe();
Bool IsEmpty();
}
我现在没有这个环境