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

📄 page15.html

📁 wqeqwvrw rkjqhwrjwq jkhrjqwhrwq jkhrwq
💻 HTML
字号:
<HTML>
<HEAD>
<TITLE>Object Hierarchies and Design Patterns</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="tex2html2066" HREF="page16.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page16.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="tex2html2064" HREF="page10.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page10.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="tex2html2058" HREF="page14.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page14.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="tex2html2068" 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="tex2html2069" 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>
<H1><A NAME="SECTION002300000000000000000">Object Hierarchies and Design Patterns</A></H1>
<P>
There is more to object-oriented programming than
simply encapsulating in an object 
some data and the procedures for manipulating those data.
Object-oriented methods deal also with the <em>classification</em> of objects
and they address the <em>relationships</em> between different classes of objects.
<P>
The primary facility for expressing relationships between classes
of objects is <em>derivation</em>--new classes can be derived from existing classes.
What makes derivation so useful is the notion of <em>inheritance</em>.
Derived classes <em>inherit</em> the characteristics of the classes
from which they are derived.
In addition,
inherited functionality can be overridden
and additional functionality can be defined in a derived class.
<P>
A feature of this book is that
virtually all the data structures are presented in the context
of a single class hierarchy.
In effect,
the class hierarchy is a taxonomy of data structures.
Different implementations of a given abstract data structure
are all derived from the same abstract base class.
Related base classes are in turn derived from
classes that abstract and encapsulate the common features of those classes.
<P>
In addition to dealing with hierarchically related classes,
experienced object-oriented designers also consider very carefully
the interactions between unrelated classes.
With experience,
a good designer discovers the recurring
patterns of interactions between objects.
By learning to use these patterns,
your object-oriented designs will become more flexible and reusable.
<P>
Recently, programmers have to started name the common design patterns.
In addition, catalogs of the common patterns are now
being compiled and published[<A HREF="page619.html#gamma" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page619.html#gamma">14</A>].
<P>
The following <em>object-oriented design patterns</em>
are used throughout this text:
<P>
<BR> <HR>
<UL> 
<LI> <A NAME="tex2html2070" HREF="page16.html#SECTION002301000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page16.html#SECTION002301000000000000000">Containers</A>
<LI> <A NAME="tex2html2071" HREF="page17.html#SECTION002302000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page17.html#SECTION002302000000000000000">Iterators</A>
<LI> <A NAME="tex2html2072" HREF="page18.html#SECTION002303000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page18.html#SECTION002303000000000000000">Visitors</A>
<LI> <A NAME="tex2html2073" HREF="page19.html#SECTION002304000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page19.html#SECTION002304000000000000000">Adapters</A>
<LI> <A NAME="tex2html2074" HREF="page20.html#SECTION002305000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page20.html#SECTION002305000000000000000">Singletons</A>
</UL>
<HR><A NAME="tex2html2066" HREF="page16.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page16.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="tex2html2064" HREF="page10.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page10.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="tex2html2058" HREF="page14.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page14.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="tex2html2068" 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="tex2html2069" 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 + -