⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 page159.html

📁 wqeqwvrw rkjqhwrjwq jkhrjqwhrwq jkhrwq
💻 HTML
字号:
<HTML>
<HEAD>
<TITLE>Array Implementation</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
 <img src="cover75.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cover75.gif" alt="Logo" align=right>
<b>Data Structures and Algorithms 
with Object-Oriented Design Patterns in C++</b><br>
<A NAME="tex2html3873" HREF="page160.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page160.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="next_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/next_motif.gif"></A> <A NAME="tex2html3871" HREF="page158.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page158.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="up_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/up_motif.gif"></A> <A NAME="tex2html3865" HREF="page158.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page158.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/previous_motif.gif"></A> <A NAME="tex2html3875" HREF="page9.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page9.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/contents_motif.gif"></A> <A NAME="tex2html3876" HREF="page620.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page620.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="index_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/index_motif.gif"></A> <BR><HR>
<H2><A NAME="SECTION007310000000000000000">Array Implementation</A></H2>
<P>
Program&nbsp;<A HREF="page159.html#progdeque2h" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page159.html#progdeque2h"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A> defines an array implementation of a deque.
The <tt>DequeAsArray</tt> class is defined using multiple inheritance:
It is derived from both the <tt>Deque</tt> abstract base class
and the <tt>QueueAsArray</tt> array-based implementation of a queue.
The <tt>Deque</tt> class provides the interface;
the <tt>QueueAsArray</tt>, the implementation.
<P>
<P><A NAME="8644">&#160;</A><A NAME="progdeque2h">&#160;</A> <IMG WIDTH=575 HEIGHT=123 ALIGN=BOTTOM ALT="program8448" SRC="img754.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img754.gif"  ><BR>
<STRONG>Program:</STRONG> <tt>DequeAsArray</tt> Class Definition<BR>
<P>
<P>
The <tt>QueueAsArray</tt> implementation provides
almost all of the required functionality.
For example, Program&nbsp;<A HREF="page159.html#progdeque2c" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page159.html#progdeque2c"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A> shows that
the <tt>Head</tt>, <tt>EnqueueTail</tt> and <tt>DequeueHead</tt> operations
of the <tt>DequeAsArray</tt> class are implemented
by calling the appropriate <tt>QueueAsArray</tt> class operations.
<P>
<P><A NAME="8647">&#160;</A><A NAME="progdeque2c">&#160;</A> <IMG WIDTH=575 HEIGHT=164 ALIGN=BOTTOM ALT="program8464" SRC="img755.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img755.gif"  ><BR>
<STRONG>Program:</STRONG> <tt>DequeAsArray</tt> Class <tt>Head</tt> 	<tt>EnqueueHead</tt> and <tt>DequeueHead</tt> Member Function Definitions<BR>
<P><BR> <HR>
<UL> 
<LI> <A NAME="tex2html3877" HREF="page160.html#SECTION007311000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page160.html#SECTION007311000000000000000"><tt>Tail</tt>, <tt>EnqueueHead</tt>,
    and <tt>DequeueTail</tt> Member Functions</A>
</UL>
<HR><A NAME="tex2html3873" HREF="page160.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page160.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="next_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/next_motif.gif"></A> <A NAME="tex2html3871" HREF="page158.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page158.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="up_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/up_motif.gif"></A> <A NAME="tex2html3865" HREF="page158.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page158.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/previous_motif.gif"></A> <A NAME="tex2html3875" HREF="page9.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page9.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/contents_motif.gif"></A> <A NAME="tex2html3876" HREF="page620.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page620.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="index_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/index_motif.gif"></A> <P><ADDRESS>
<img src="bruno.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/bruno.gif" alt="Bruno" align=right>
<a href="javascript:if(confirm('http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/copyright.html  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/copyright.html'" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/copyright.html">Copyright &#169; 1997</a> by <a href="javascript:if(confirm('http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/signature.html  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/signature.html'" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/signature.html">Bruno R. Preiss, P.Eng.</a>  All rights reserved.

</ADDRESS>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -