<html>

<head><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- MyFirstUnitAd -->
<ins class="adsbygoogle"
     style="display:inline-block;width:970px;height:250px"
     data-ad-client="ca-pub-5778386704669218"
     data-ad-slot="1503492166"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>

<body>

<div align="center">
  <center>
  <pre><b><font color="#FF0000" size="6">我的字典</font></b></pre>
  </center>
</div>

<div align="left">
  <pre><b><font color="#FF0000" size="5">A.第一版</font></b></pre>
</div>
<div align="left">
  <pre><b>这个小程序是最初的版本。</b></pre>
</div>
<div align="left">
  <pre><b>1。 程序基本说明：这是一个字典程序。我用二叉搜索树来存字，同时，从文件读取新字并插入，将当前的数据存入流文件，保存，当下次程序运行</b></pre>
</div>
<div align="left">
  <pre><b>	时候再从磁盘文件读入原来的树的信息。</b></pre>
</div>
<div align="left">
  <pre><b>2。 程序思路：</b><b>我的树采用继承的方式，</b></pre>
  <pre><b>	A. 最base的树class Tree实现最基本的功能，如：遍历（分前序，中序，后序），并可以靠传入函数指针完成遍历</b></pre>
  <pre><b>	中对每一个节点的方法。以及所有基本的访问，添加左右儿子，父亲，各种属性，如名字，健值，序列号等等方法。并重载了大于，小</b></pre>
  <pre><b>	</b><b>于，等于的操作符，并将大部分方法设为虚方法，以便后代重载。</b></pre>
  <pre><b>	B. BinaryTree主要实现了二叉搜索树的插入，删除，前一个，后一个的方法。</b></pre>
  <pre><b>	C. WordTree实现了字典中的所有方法（详见3）。并重载了比较符运算，大小比较方法函数，健值设定方法。	</b></pre>
</div>
<div align="left">
  <pre><b>3。 主要函数介绍：</b></pre>
</div>
<div align="left" style="width: 892; height: 102">
  <pre><b>     </b><b>A.  readFromFile(const char* fileName)从磁盘文件中顺序读入每个节点的信息重新建树。</b></pre>
  <blockquote>
    <pre><b>B. saveToFile(const char* fileName)按照前序遍历树并把节点信息存入流文件保存在磁盘。</b></pre>
    <pre><b>C. openFile(const char* fileName)打开文件并读取其中的字，经比较后插入搜索树。</b></pre>
    <pre><b>D. void defaultVisit(Tree* node)默认的访问函数，用户可以自己定义自己的访问函数，只要带一个Tree*参数，并在遍历方法</b></pre>
    <pre><b>void Tree::traverse(void (*visit)(Tree* node), TraverseOrder defaultOrder)中以visit参数形式传入。TraverseOrder</b></pre>
    <pre><b> defaultOrder</b><b>参数设定遍历的前序，中序，后序方式。</b></pre>
    <pre><b>E. addNode(WordTree* node, FILE** stream)该函数为内部实现从磁盘读取某个节点信息的方法，存入的数据有三个：本身的序列</b></pre>
    <pre><b>号，字串，以及父亲的序列号。根节点的父亲序列号设为-1。两个序列号都为-1表明文件结尾。</b></pre>
  </blockquote>
</div>
<div align="left">
  <pre><b>4。 不足之处：</b></pre>
</div>
<div align="left">
  <pre><b>	A. 不知道为了什么，我按照顺序存储后，流文件的feof()函数变得不可用了，只好自己在文件结尾处写入-1， -1来识别。</b></pre>
</div>
<div align="left">
  <pre><b>	B. 写的时候忘记支持unicode，结果不支持汉字，等以后改吧。</b></pre>
</div>
<div align="left">
  <pre><b>	C. 有一个疑惑，我存了大约400个字，结果文件竟然有7K,平均一个单词有十几个字母长？不明白？</b></pre>
</div>
<div align="left">
  <pre><b>	D. 还要增加查询功能。（让我喘口气，为了文件结束标志的问题，我累得两天多了。）</b></pre>
</div>
<div align="left">
  <pre><b>5。 <a href="MyTree.zip">下载执行程序</a>。</b></pre>
</div>
<div align="left">
  <pre><b>	</b></pre>
</div>
<pre>#include &lt;iostream&gt;
#include &lt;cstdlib&gt;
#include &lt;cstring&gt;
#include &lt;fstream&gt;
#include &lt;ctime&gt;

using namespace std;


const MaxWordLength = 255;

enum TraverseOrder
{
	PREORDER, MIDORDER, POSTORDER
};


class Tree
{
private:	
	Tree* pLeft;
	Tree* pRight;
	Tree* pParent;
	char* pName;
	int index;
	static int treeCounter;
	static Tree* pRoot;
	void preWalk(Tree* node, void (*visit)(Tree* node));
	void midWalk(Tree* node, void (*visit)(Tree* node));
	void postWalk(Tree* node, void (*visit)(Tree* node));
protected:
	void* pKey;
public:
	Tree* left();
	Tree* right();
	Tree* parent();
	virtual void* key();
	virtual void setKey(void* newKey);
	void setRoot(Tree* node);
	const char* name();
	const int getIndex();
	void setLeft(Tree* leftSon);
	void setRight(Tree* rightSon);
	void setParent(Tree* father);
	void setIndex(const int number);
	virtual	int compare(const void* otherKey); 
	void setName(const char *str);
	void giveBirth();
	virtual bool operator&gt;(Tree&amp;);
	virtual bool operator==(Tree&amp;);
	virtual bool operator&lt;(Tree&amp;);	
	Tree();
	virtual ~Tree();
	static Tree* root() {return pRoot;}
	const int count();
	void traverse(void ( *visit)(Tree* node), TraverseOrder defaultOrder= MIDORDER);
};





void defaultVisit(Tree* node);

class BinaryTree: public Tree
{
private:

public:
	void remove(BinaryTree* node);
	BinaryTree* next();
	BinaryTree* prev();
	bool insert(BinaryTree* node);
	virtual ~BinaryTree();
};

class WordTree: public BinaryTree
{
private:
	static int wordLength;
	static int wordCounter;
	WordTree* addNode(WordTree* node, FILE** stream);
protected:
	void setWordCounter();
	void readWord(FILE** file);
	void addWord(char* buffer);
public:
	
	WordTree* readNode(WordTree* node, FILE** stream);
	WordTree* readFromFile(const char* fileName);
	void saveNode(WordTree* node, FILE** stream);
	virtual int compare(const void *otherKey);
	void setWordLength(const int newLength);
	static const int getWordLength();
	virtual void setKey(void* newKey);
	virtual bool operator&gt;(Tree&amp;);
	virtual bool operator==(Tree&amp;);
	virtual bool operator&lt;(Tree&amp;);
	void openFile(const char* fileName);
	WordTree(const char * fileName);
	WordTree();
	int wordCount();
	virtual void setName(const char *str);
	void saveToFile(const char* fileName);
	~WordTree();


};


int count=0;


int main()
{
	WordTree *ptr = new WordTree;
	char choice[6], fileName[30];

	ptr = ptr-&gt;readFromFile(&quot;c:\\nickback.txt&quot;);
	cout&lt;&lt;&quot;quit? or input?\nEnter your choice: \n&quot;;
	cin&gt;&gt;choice;
	while (strcmp(choice, &quot;quit&quot;)!=0&amp;&amp;strcmp(choice, &quot;input&quot;)!=0)
	{
		cout&lt;&lt;&quot;quit? or input?\n Enter your choic: \n&quot;;
		cin&gt;&gt;choice;
	}
	if (strcmp(choice, &quot;quit&quot;)==0)
	{
		cout&lt;&lt;&quot;The total number of words in dictionary is &quot;&lt;&lt;ptr-&gt;wordCount();
		return 0;
	}
	else
	{
		if (strcmp(choice, &quot;input&quot;)==0)
		{
			cout&lt;&lt;&quot;\nnow input file name here(input 'quit' to exit):\n&quot;;
			cin&gt;&gt;fileName;
			while (strcmp(fileName, &quot;quit&quot;)!=0)
			{
				ptr-&gt;openFile(fileName);
				cout&lt;&lt;&quot;\nnow input file name here(input quit to exit):\n&quot;;
				
				cin&gt;&gt;fileName;
			}
			cout&lt;&lt;&quot;\nDo you want to see contents?(yes or no)\n&quot;;
			
			
			cin&gt;&gt;choice;
			if (strcmp(choice, &quot;yes&quot;)==0)
			{
				ptr-&gt;traverse(defaultVisit, PREORDER);
			}
			cout&lt;&lt;&quot;The total number of words in dictionary is &quot;&lt;&lt;ptr-&gt;wordCount();
			ptr-&gt;saveToFile(&quot;c:\\nickback.txt&quot;);
		}
	}

	return 0;
}

int WordTree::wordCounter = 0;
int WordTree::wordLength = 20;


BinaryTree::~BinaryTree()
{

}


WordTree::~WordTree()
{
	
}

void WordTree::setWordCounter()
{
	wordCounter ++;
}

const int WordTree::getWordLength()
{
	return wordLength;
}

WordTree* WordTree::addNode(WordTree* node, FILE** stream)
{
	char buffer[MaxWordLength];
	int index, pIndex, number;
	WordTree *domino;
	char *ptr=buffer, ch;
	
	number = fread((void*)(&amp;index), sizeof(int), 1, *stream);
	number = fread((void*)(&amp;pIndex), sizeof(int), 1, *stream);

	if (index==-1&amp;&amp;pIndex==-1)
	{
		return NULL;
	}

	do
	{
		ch = fgetc(*stream);
		*ptr = ch;
		ptr++;
	}
	while(ch!='\0');

	setWordCounter();  //add a word

	if (pIndex== -1)  //this is root
	{			
		node-&gt;setIndex(index);
		node-&gt;setName(buffer);
		node-&gt;setRoot(node);
		return node;
	}

	while (pIndex!=node-&gt;getIndex())
	{	
		if (node-&gt;parent()==NULL)
		{
			return NULL;
		}
		node= (WordTree*)node-&gt;parent(); 
	}


	if (node!=NULL&amp;&amp;pIndex==node-&gt;getIndex())
	{
		domino = new WordTree;
		domino-&gt;setIndex(index);
		domino-&gt;setName(buffer);
		domino-&gt;setParent(node);
		if (*domino&lt;*node)
		{
			node-&gt;setLeft(domino);
		}
		else
		{
			node-&gt;setRight(domino);
		}
		
		return domino;
	}
	else
	{
		return NULL;
	}
}


WordTree* WordTree::readNode(WordTree* node, FILE** stream)
{	
	WordTree* domino = node;

	while (domino!=NULL)
	{
		domino = addNode(domino, stream);
	}
	return (WordTree*)node-&gt;root();  //this is ugly as I have to remove those sentinal 
}

WordTree* WordTree::readFromFile(const char* fileName)
{
	FILE* stream;

	if ((stream=fopen(fileName, &quot;r+b&quot;))==NULL)
	{
		cout&lt;&lt;&quot;unable to open file &quot;&lt;&lt;fileName&lt;&lt;endl;
		return NULL;
	}
	else
	{
		WordTree* ptr= new WordTree;
		return readNode(ptr, &amp;stream);	
	}
	fclose(stream);
}

void WordTree::saveNode(WordTree* node, FILE** stream)
{
	int first, second, number;

	first = node-&gt;getIndex();

	number = fwrite((void*)(&amp;first), sizeof(int), 1, *stream);
	if (node-&gt;parent()==NULL)
	{
		second = -1;		
	}
	else
	{
		second = node-&gt;parent()-&gt;getIndex();		
	}
	number = fwrite((void*)(&amp;second), sizeof(int), 1, *stream);
	number = fwrite((void*)(node-&gt;name()),sizeof(char), strlen(node-&gt;name()), *stream);
	number = fputc('\0', *stream);//I have to put this '/n' otherwise there is always problem!
}

	
void traverseTree(WordTree* node, FILE** stream)
{
	if (node!=NULL)
	{
		node-&gt;saveNode(node, stream);
		traverseTree((WordTree*)node-&gt;left(), stream);
		traverseTree((WordTree*)node-&gt;right(), stream);
	}
}

void writeEnd(FILE** stream)
{
	int temp1=-1, temp2=-1;
	fwrite((void*)(&amp;temp1), sizeof(int), 1, *stream);
	fwrite((void*)(&amp;temp2), sizeof(int), 1, *stream);
}

void WordTree::saveToFile(const char* fileName)
{
	void traverseTree(WordTree* node, FILE ** stream);
	void writeEnd(FILE** stream);

	WordTree *domino;
	
	FILE * stream;

	
	if ((stream=fopen(&quot;c:\\nickback.txt&quot;, &quot;w+b&quot;))==NULL)
	{
		cout&lt;&lt;&quot;unable to save to file &quot;&lt;&lt;fileName&lt;&lt;endl;
	}
	else
	{
		domino = (WordTree*)root();
		traverseTree((WordTree*)domino, &amp;stream);
	}
	writeEnd(&amp;stream);
	fclose(stream);
}

	
const int Tree::count()
{
	return treeCounter;
}

void WordTree::setWordLength(const int newLength)
{
	if (newLength&gt;MaxWordLength)
	{
		cout&lt;&lt;&quot;exceed max word length.&quot;&lt;&lt;endl;
	}
	else
	{
		wordLength = newLength;
	}
}

int WordTree::compare(const void*otherKey)
{
	return strcmp((char*)key(), (char*)otherKey);
}

int WordTree::wordCount()
{
	return wordCounter;
}

WordTree::WordTree()
{

}

void WordTree::openFile(const char* fileName)
{
	FILE * stream;	
	if ((stream=fopen(fileName, &quot;r+b&quot;))==NULL)
	{
		cout&lt;&lt;&quot;unable open file!&quot;&lt;&lt;endl;
	}
	else
	{
		readWord(&amp;stream);
	}
	fclose(stream);
}

void WordTree::readWord(FILE **stream)
{
	char buffer[MaxWordLength];
	char *ptr = buffer;
	char ch;
	int counter =0;

	
	while (!feof(*stream))
	{
		ptr = buffer;
		counter =  0;
		ch = toupper(fgetc(*stream));
		while (isalnum(ch)&amp;&amp;!feof(*stream)&amp;&amp;counter&lt;wordLength)
		{
			*ptr = ch;
			ch = toupper(fgetc(*stream));
			ptr++;
			counter++;
		}

		if (ptr!=buffer)
		{
			*ptr='\0';
			addWord(buffer);
		}	
	}
}

void WordTree::addWord(char * buffer)
{
	WordTree * newTree= new WordTree;

	newTree-&gt;setName(buffer);
	if (insert(newTree))
	{
		setWordCounter();
	}
	else
	{
		newTree-&gt;setKey((void*)NULL);
		delete newTree;
	}
}

void WordTree::setName(const char *str)
{
	Tree::setName(str);
	setKey((void*)name());
}

int Tree::treeCounter= 0;

WordTree::WordTree(const char* fileName)
{
	WordTree::WordTree();
	openFile(fileName);
}

void WordTree::setKey(void * newKey)
{
	pKey = newKey;
}

bool WordTree::operator &lt;(Tree&amp; second)
{
	if (strcmp((char*)key(), (char*)second.key())&lt;0)
	{
		return true;
	}
	else
	{
		return false;
	}
}

bool WordTree::operator ==(Tree&amp; second)
{
	if (strcmp((char*)key(), (char*)second.key())==0)
	{
		return true;
	}
	else
	{
		return false;
	}
}

bool WordTree::operator &gt;(Tree&amp; second)
{
	if (strcmp((char*)key(), (char*)second.key())&gt;0)
	{
		return true;
	}
	else
	{
		return false;
	}
}

void defaultVisit(Tree* node)
{
	cout&lt;&lt;&quot;\n\n&quot;;
	cout&lt;&lt;&quot;default visiting tree index:&quot;&lt;&lt;node-&gt;getIndex()&lt;&lt;endl;
	cout&lt;&lt;&quot;and tree name is:&quot;&lt;&lt;node-&gt;name()&lt;&lt;endl;
	if (node-&gt;parent()!=NULL)
	{
		cout&lt;&lt;&quot;its parent is:&quot;&lt;&lt;node-&gt;parent()-&gt;name()&lt;&lt;endl;
		if (node==node-&gt;parent()-&gt;left())
		{
			cout&lt;&lt;&quot;and it is left son.&quot;&lt;&lt;endl;
		}
		else
		{
			cout&lt;&lt;&quot;and it is right son&quot;&lt;&lt;endl;
		}
	}
	else
	{
		cout&lt;&lt;&quot;it has no parent&quot;&lt;&lt;endl;
	}
	cout&lt;&lt;&quot;\n\n&quot;;
}


void Tree::preWalk(Tree* node, void (*visit)(Tree* node))
{
	if (node!=NULL)
	{	
		visit(node);
		preWalk(node-&gt;left(), visit);		
		preWalk(node-&gt;right(), visit);
	}
}



void Tree::postWalk(Tree* node, void (*visit)(Tree* node))
{
	if (node!=NULL)
	{
		postWalk(node-&gt;left(), visit);
		postWalk(node-&gt;right(), visit);
		visit(node);
	}
}

void Tree::midWalk(Tree* node, void (*visit)(Tree* node))
{
	if (node!=NULL)
	{
		midWalk(node-&gt;left(), visit);
		visit(node);
		midWalk(node-&gt;right(), visit);
	}
}


void Tree::traverse(void (*visit)(Tree* node), TraverseOrder defaultOrder)
{
	Tree *domino;
	domino = root();

	switch(defaultOrder)
	{
	case PREORDER:
		preWalk(domino, visit);
		break;
	case MIDORDER:
		midWalk(domino, visit);
		break;
	case POSTORDER:
		postWalk(domino, visit);
		break;
	}
}

Tree* Tree::pRoot = NULL;

void BinaryTree::remove(BinaryTree* node)
{
	BinaryTree* ptr=NULL;

	if (node-&gt;left()==NULL || node-&gt;right()==NULL)
	{
		if (node-&gt;left()!=NULL)
		{
			node-&gt;parent()-&gt;setLeft(node-&gt;left());
			node-&gt;left()-&gt;setParent(node-&gt;parent());
		}
		if (node-&gt;right()!=NULL)
		{
			node-&gt;parent()-&gt;setRight(node-&gt;right());
			node-&gt;right()-&gt;setParent(node-&gt;parent());
		}
	}
	else
	{
		ptr = node-&gt;next();
		remove(ptr);
		ptr-&gt;setParent(node-&gt;parent());
		if (node-&gt;parent()==NULL)
		{
			node-&gt;setRoot(ptr);			
		}
		else
		{
			if (node==node-&gt;parent()-&gt;left())
			{
				node-&gt;parent()-&gt;setLeft(ptr);
			}
			else
			{
				node-&gt;parent()-&gt;setRight(ptr);
			}
			ptr-&gt;setLeft(node-&gt;left());
			ptr-&gt;setRight(node-&gt;right());
		}
	}
}


bool Tree::operator==(Tree&amp; second)
{
	if (this-&gt;compare(second.key())==0)
	{
		return true;
	}
	else
	{
		return false;
	}	
}

bool Tree::operator &lt;(Tree&amp; second)
{
	if (this-&gt;compare(second.key())&lt;0)
	{
		return true;
	}
	else
	{
		return false;
	}	
}


bool Tree::operator &gt;(Tree&amp; second)
{
	if (this-&gt;compare(second.key())&gt;0)
	{
		return true;
	}
	else
	{
		return false;
	}	
}

int Tree::compare(const void * otherKey)
{
	return *((int*)(key()))- *((int*)(otherKey));
}

void* Tree::key()
{
	return pKey;
}

void Tree::setKey(void *newKey)
{
	pKey = malloc(sizeof(int));
	*(int*)(pKey) = *(int*)(newKey);
}



void Tree::setRoot(Tree *node)
{
	pRoot = node;
}

bool BinaryTree::insert(BinaryTree* node)
{
	Tree* ptr, *dummy;

	ptr = root();
	dummy = ptr;
	while (ptr!=NULL)
	{
		dummy = ptr;
		if (*ptr&gt;*node)
		{				
			ptr = ptr-&gt;left();
		}
		else
		{
			if (*ptr&lt;*node)
			{
				ptr=ptr-&gt;right();
			}
			else
			{
				if (*ptr==*node)
				{
					return false;				
				}
			}
		}
	}

	node-&gt;setParent(dummy);

	if (dummy==NULL)
	{
		setRoot(node);		
	}
	else
	{
	//	node-&gt;setRoot(dummy-&gt;root());
		if (*dummy&gt;*node)
		{
			dummy-&gt;setLeft(node);
		}
		else
		{
			if (*dummy&lt;*node)
			{
				dummy-&gt;setRight(node);
			}
		}  //if &quot;== &quot;, donot insert;
	}
	return true;
}
				
void Tree::setLeft(Tree* leftSon)
{
	pLeft = leftSon;
}

void Tree::setRight(Tree* rightSon)
{
	pRight = rightSon;
}

void Tree::setParent(Tree* father)
{
	pParent = father;
}


void Tree::giveBirth()
{
	Tree* leftTree = new Tree;
	Tree* rightTree = new Tree;
	char str[128];

	leftTree-&gt;setIndex(this-&gt;getIndex() *2 );
	rightTree-&gt;setIndex(this-&gt;getIndex() * 2 + 1);

	this-&gt;setLeft(leftTree);
	this-&gt;setRight(rightTree);

	leftTree-&gt;setParent(this);
	rightTree-&gt;setParent(this);

	strcpy(str, &quot;left son of &quot;);
	strcat(str, this-&gt;name());

	leftTree-&gt;setName(str);

	strcpy(str, &quot;right son of &quot;);
	strcat(str, this-&gt;name());

	rightTree-&gt;setName(str);

	leftTree-&gt;setParent(this);
	rightTree-&gt;setParent(this);

	if (root()==NULL)
	{
		setRoot(this);
		setParent(NULL);
	}
	/*
	else
	{
		leftTree-&gt;setRoot(root());
		rightTree-&gt;setRoot(root());
	}
	*/
}


void Tree::setIndex(const int number)
{
	index = number;
}

const int Tree::getIndex()
{
	return index;
}

const char* Tree::name()
{
	return pName;
}

void Tree::setName(const char *str)
{
	if (str!=NULL)
	{
		pName = (char *)malloc(strlen(str)+1);
		strcpy(pName, str);
	}
}

Tree::Tree()
{
	setIndex(treeCounter);
	treeCounter++;
	pLeft = NULL;
	pRight = NULL;
	pParent = NULL;
	pName = NULL;
	pKey = NULL;
}

Tree::~Tree()
{
	if (pName!=NULL)
	{
		free(pName);
	}
	if (pKey!=NULL)
	{
		free(pKey);
	}
}

Tree* Tree::left()
{
	return pLeft;
}

Tree* Tree::right()
{
	return pRight;
}

Tree* Tree::parent()
{
	return pParent;
}

BinaryTree* BinaryTree::next()
{
	Tree* result = NULL;

	if (right()!=NULL)
	{
		result = right();
		while (result-&gt;left!=NULL)
		{
			result = result-&gt;left();
		}
	}
	else
	{
		if (parent()!= NULL)
		{
			result = this;
			while(result-&gt;parent()!=NULL&amp;&amp;result==result-&gt;parent()-&gt;right())
			{
				result = result-&gt;parent();
			}
		}
		//result = null
	}
	return (BinaryTree*)result;
}

BinaryTree* BinaryTree::prev()
{
	Tree* result = NULL;
	if (left()!=NULL)
	{
		result = left();
		while (result-&gt;right()!=NULL)
		{
			result = result-&gt;right();
		}
	}
	else
	{
		if (parent()!=NULL)
		{
			result = this;
			while (result-&gt;parent()!=NULL&amp;&amp;result==result-&gt;parent()-&gt;left())
			{
				result = result-&gt;parent();
			}
		}
	}
	return (BinaryTree*)result;
}



<a href="picture/dictionary.JPG"><img border="0" src="picture/dictionary.JPG" width="665" height="431"></a>



</pre>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;           
&nbsp; <a href="pirate.htm"><img src="picture/back.gif"      
style="border: medium none" width="32" height="35" alt="back.gif (341 bytes)"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
<a href="index.htm"><img src="picture/up.gif" style="border: medium none" width="35"
height="32" alt="up.gif (335 bytes)"></a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="Precedence.htm"><img src="picture/next.gif" style="border: medium none" width="32"       
height="35" alt="next.gif (337 bytes)"></a></p>

</body>

</html>
