[Gd-chatter] r10890 - trunk/www/books/dpg

tim at gwydiondylan.org tim at gwydiondylan.org
Mon Sep 4 03:46:27 CEST 2006


Author: tim
Date: Mon Sep  4 03:46:26 2006
New Revision: 10890

Added:
   trunk/www/books/dpg/figure-7.2.png   (contents, props changed)
   trunk/www/books/dpg/figure-7.3.png   (contents, props changed)
Modified:
   trunk/www/books/dpg/db_98.html
Log:
job: website

image replacements for figures 7.2 and 7.3 plus additional html cleanup


Modified: trunk/www/books/dpg/db_98.html
==============================================================================
--- trunk/www/books/dpg/db_98.html	(original)
+++ trunk/www/books/dpg/db_98.html	Mon Sep  4 03:46:26 2006
@@ -2,18 +2,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
-	<head>
-		<link title="main style sheet" rel="stylesheet" href="dpg.css" type="text/css" />
-		<link rel="top" href="db_1.html" />
-		<link rel="up" href="db_92.html" />
-		<link rel="prev" href="db_97.html" />
-		<link rel="next" href="db_99.html" />
-		<title>Dylan Programming: 7.6   Meeting of angles and times</title>
-	</head>
+  <head>
+    <link title="main style sheet" rel="stylesheet" href="dpg.css" type="text/css" />
+    <link rel="top" href="db_1.html" />
+    <link rel="up" href="db_92.html" />
+    <link rel="prev" href="db_97.html" />
+    <link rel="next" href="db_99.html" />
+    <title>Dylan Programming: 7.6   Meeting of angles and times</title>
+  </head>
 <body>
 
 <div class="navigation">
-	<p><a href="db_99.html" accesskey="n"><img src="next.gif" alt="next" /></a> <a href="db_97.html" accesskey="p"><img src="prev.gif" alt="previous" /></a> <a href="db_1.html" accesskey="t"><img src="top.gif" alt="top" /></a> <a href="db_2.html" accesskey="c"><img src="content.gif" alt="contents" /></a> <a href="db_349.html" accesskey="i"><img src="index.gif" alt="index" /></a></p>
+  <p><a href="db_99.html" accesskey="n"><img src="next.gif" alt="next" /></a> <a href="db_97.html" accesskey="p"><img src="prev.gif" alt="previous" /></a> <a href="db_1.html" accesskey="t"><img src="top.gif" alt="top" /></a> <a href="db_2.html" accesskey="c"><img src="content.gif" alt="contents" /></a> <a href="db_349.html" accesskey="i"><img src="index.gif" alt="index" /></a></p>
 </div>
 
 <div class="content" id="heading98-0">
@@ -23,55 +23,72 @@
 define abstract class &lt;sixty-unit&gt; (&lt;object&gt;)
   slot total-seconds :: &lt;integer&gt;, init-keyword: total-seconds:;
 end class &lt;sixty-unit&gt;;
-define method decode-total-seconds 
+
+define method decode-total-seconds
     (sixty-unit :: &lt;sixty-unit&gt;)
  =&gt; (max-unit :: &lt;integer&gt;, minutes :: &lt;integer&gt;, seconds :: &lt;integer&gt;)
   decode-total-seconds(abs(sixty-unit.total-seconds));
 end method decode-total-seconds;
-define method encode-total-seconds 
-    (max-unit :: &lt;integer&gt;, minutes :: &lt;integer&gt;, seconds :: &lt;integer&gt;) 
+
+define method encode-total-seconds
+    (max-unit :: &lt;integer&gt;, minutes :: &lt;integer&gt;, seconds :: &lt;integer&gt;)
  =&gt; (total-seconds :: &lt;integer&gt;)
   ((max-unit * 60) + minutes) * 60 + seconds;
-end method encode-total-seconds; 
+end method encode-total-seconds;
 </pre>
 <p>We redefine the time and angle classes and methods to take advantage of the new <code>&lt;sixty-unit&gt;</code> class:</p>
 <pre>
 define abstract class &lt;time&gt; (&lt;sixty-unit&gt;)
-end class &lt;time&gt;; 
+end class &lt;time&gt;;
+
 define abstract class &lt;angle&gt; (&lt;sixty-unit&gt;)
-end class &lt;angle&gt;; 
+end class &lt;angle&gt;;
+
 define method say (angle :: &lt;angle&gt;) =&gt; ()
   let(degrees, minutes, seconds) = decode-total-seconds(angle);
   format-out(&quot;%d degrees %d minutes %d seconds&quot;,
              degrees, minutes, seconds);
-end method say; 
-<em>// definition unchanged, repeated for completeness
-</em>define abstract class &lt;directed-angle&gt; (&lt;angle&gt;)
+end method say;
+
+<em>// definition unchanged, repeated for completeness</em>
+define abstract class &lt;directed-angle&gt; (&lt;angle&gt;)
   slot direction :: &lt;string&gt;, init-keyword: direction:;
-end class &lt;directed-angle&gt;; 
+end class &lt;directed-angle&gt;;
+
 define method say (angle :: &lt;directed-angle&gt;) =&gt; ()
   next-method();
   format-out(&quot; %s&quot;, angle.direction);
-end method say; 
-<em>// definition unchanged, repeated for completeness
-</em>define class &lt;relative-angle&gt; (&lt;angle&gt;)
+end method say;
+
+<em>// definition unchanged, repeated for completeness</em>
+define class &lt;relative-angle&gt; (&lt;angle&gt;)
 end class &lt;relative-angle&gt;;
-<em>// we need to show degrees for &lt;relative-angle&gt;, but do not need to show
-// minutes and seconds,so we override the method on &lt;angle&gt;
-</em>define method say (angle :: &lt;relative-angle&gt;) =&gt; ()
+
+<em>// we need to show degrees for &lt;relative-angle&gt;, but do not need to show</em>
+<em>// minutes and seconds,so we override the method on &lt;angle&gt;</em>
+define method say (angle :: &lt;relative-angle&gt;) =&gt; ()
   format-out(&quot; %d degrees&quot;, decode-total-seconds(angle));
-end method say; 
+end method say;
+
 define method say (position :: &lt;relative-position&gt;) =&gt; ()
   format-out(&quot;%d miles away at heading &quot;, position.distance);
   say(position.angle);
-end method say; 
+end method say;
 </pre>
 <p>To see the complete library, and the test code that creates position instances and calls <code>say</code> on them, see <a href="db_103.html#marker-9-278">Chapter 8,  <em>A Simple Library</em></a>.</p>
 <p><a href="#marker-9-259">Figure 7.2</a> shows the inheritance relationships of the classes. When one class inherits from another, the relationship is sometimes called the <a name="marker-2-270"></a><strong>is-a relationship</strong>. For example, a direct instance of <code>&lt;time-offset&gt;</code> <em>is a</em> <code>&lt;time&gt;</code> as well, and it <em>is a</em> <code>&lt;sixty-unit&gt;</code>.</p>
-<table><caption>Figure 7.2   <a name="marker-9-259"></a>Is-a relationships (inheritance) among classes, shown by arrows. Abstract classes are shown in <em>oblique</em> <em>typewriter</em> <em>font.</em></caption><tr><td><p><img alt="db98im14" src="db98im14.gif" /></p>
+<table><caption>Figure 7.2   <a name="marker-9-259"></a>Is-a relationships (inheritance) among classes, shown by arrows. Abstract classes are shown in <em>oblique</em> <em>typewriter</em> <em>font.</em></caption><tr><td><p><img alt="Figure 7.2" src="figure-7.2.png" /></p>
 </td></tr></table><p>The classes have another kind of relationship as well &mdash; one class can use another class as the type of a slot, in what is called the <a name="marker-2-271"></a><strong>has-a relationship</strong>. <a href="#marker-9-260">Figure 7.3</a> shows both the inheritance relationships, and the relationships of one class using another class as the type of a slot.</p>
-<table><caption>Figure 7.3   <a name="marker-9-260"></a>Has-a relationships among classes, shown by dashed arrows.</caption><tr><td><p><img alt="db98im15" src="db98im15.gif" /></p>
-</td></tr></table>
+  <table>
+    <caption>Figure 7.3 <a name="marker-9-260"></a>Has-a relationships among classes, shown by dashed arrows.</caption>
+    <tr>
+      <td>
+        <p>
+          <img alt="Figure 7.3" src="figure-7.3.png" />
+        </p>
+      </td>
+    </tr>
+  </table>
 </div>
 
 <div class="toc">
@@ -83,10 +100,10 @@
 <address>Dylan Programming - 9 Apr 1999</address>
 </div>
 <div class="navigation">
-	<p><a href="db_99.html" accesskey="n"><img src="next.gif" alt="next" /></a> <a href="db_97.html" accesskey="p"><img src="prev.gif" alt="previous" /></a> <a href="db_1.html" accesskey="t"><img src="top.gif" alt="top" /></a> <a href="db_2.html" accesskey="c"><img src="content.gif" alt="contents" /></a> <a href="db_349.html" accesskey="i"><img src="index.gif" alt="index" /></a></p>
+  <p><a href="db_99.html" accesskey="n"><img src="next.gif" alt="next" /></a> <a href="db_97.html" accesskey="p"><img src="prev.gif" alt="previous" /></a> <a href="db_1.html" accesskey="t"><img src="top.gif" alt="top" /></a> <a href="db_2.html" accesskey="c"><img src="content.gif" alt="contents" /></a> <a href="db_349.html" accesskey="i"><img src="index.gif" alt="index" /></a></p>
 </div>
 <div class="copyright">
-	<p>N Feinberg/S E Keene/R Mathews/P Tucker Withington, DYLAN PROGRAMMING, (c) 1997 Harlequin Inc. Reproduced by permission of Addison-Wesley Longman Publishing Company, Inc.  All rights reserved. No further copying, downloading or transmitting of this material is allowed without the prior written permission of the publisher.</p>
+  <p>N Feinberg/S E Keene/R Mathews/P Tucker Withington, DYLAN PROGRAMMING, (c) 1997 Harlequin Inc. Reproduced by permission of Addison-Wesley Longman Publishing Company, Inc.  All rights reserved. No further copying, downloading or transmitting of this material is allowed without the prior written permission of the publisher.</p>
 </div>
 </body>
 </html>

Added: trunk/www/books/dpg/figure-7.2.png
==============================================================================
Binary file. No diff available.

Added: trunk/www/books/dpg/figure-7.3.png
==============================================================================
Binary file. No diff available.



More information about the chatter mailing list