{\rtf1\ansi\deff1\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman{\*\falt Thorndale};}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\froman\fprq2\fcharset0 Times New Roman;}{\f3\fmodern\fprq1\fcharset0 Courier New;}{\f4\fswiss\fprq2\fcharset0 Arial Unicode MS;}}
{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
{\stylesheet{\s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\snext1 Default;}
{\s2\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext2 Text body;}
{\s3\sb240\sa120\keepn\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs28\lang1033\ltrch\dbch\afs28\langfe1033\loch\fs28\lang1033\sbasedon1\snext2 Heading;}
{\s4\li360\ri0\fi-360\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext4 List;}
{\s5\li720\ri0\fi-360\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext5 List 2;}
{\s6\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext6 Header;}
{\s7\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon2\snext7 Table Contents;}
{\s8\sa120\cf0\qc{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ai\ab\ltrch\dbch\af1\afs20\langfe1033\ai\ab\loch\f1\fs20\lang1033\i\b\sbasedon7\snext8 Table Heading;}
{\s9\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext9 Index;}
{\s10\sb240\sa60\cf0\qc{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs32\lang1033\ab\ltrch\dbch\afs32\langfe1033\ab\loch\fs32\lang1033\b\sbasedon1\snext11 Title;}
{\s11\sa60\cf0\qc{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs24\lang1033\ltrch\dbch\afs24\langfe1033\loch\fs24\lang1033\sbasedon1\snext2 Subtitle;}
{\s12\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe255\loch\f1\fs24\sbasedon1\snext12 Normal;}
{\s13\sb240\sa60\keepn\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs28\lang1033\ab\ltrch\dbch\afs28\langfe1033\ab\loch\fs28\lang1033\b\sbasedon1\snext1 heading 1;}
{\s14\keepn\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ab\ltrch\dbch\af1\afs20\langfe255\ab\loch\f1\fs20\b\sbasedon12\snext12 heading 2;}
{\s15\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext15 header;}
{\s16\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext16 footer;}
{\s17\sb120\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ai\ltrch\dbch\af1\afs20\langfe1033\ai\loch\f1\fs20\lang1033\i\sbasedon1\snext17 caption;}
{\s18\cf1{\*\tlswg8236}\tx916{\*\tlswg8236}\tx1832{\*\tlswg8236}\tx2748{\*\tlswg8236}\tx3664{\*\tlswg8236}\tx4580{\*\tlswg8236}\tx5496{\*\tlswg8236}\tx6412{\*\tlswg8236}\tx7328{\*\tlswg8236}\tx8244{\*\tlswg8236}\tx9160{\*\tlswg8236}\tx10076{\*\tlswg8236}\tx10992{\*\tlswg8236}\tx11908{\*\tlswg8236}\tx12824{\*\tlswg8236}\tx13740{\*\tlswg8236}\tx14656{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af4\afs20\langfe1033\loch\f4\fs20\sbasedon12\snext18 HTML Preformatted;}
{\*\cs20\cf1\rtlch\af1\lang1033\ltrch\dbch\af1\langfe255\loch\f1\sbasedon31 Numbering Symbols;}
{\*\cs21\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 1;}
{\*\cs22\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 2;}
{\*\cs23\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 3;}
{\*\cs24\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 4;}
{\*\cs25\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 5;}
{\*\cs26\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 6;}
{\*\cs27\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 7;}
{\*\cs28\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 8;}
{\*\cs29\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 9;}
{\*\cs30\cf1\rtlch\af1\lang1033\ltrch\dbch\af1\langfe1033\loch\f1\sbasedon31 Default Paragraph Font;}
{\*\cs31\cf1\rtlch\af1\lang1033\ltrch\dbch\af1\langfe255\loch\f1 Normal;}
{\*\cs32\cf1\rtlch\af1\lang1033\ltrch\dbch\af1\langfe255\loch\f1\sbasedon31 WW-Default Paragraph Font;}
{\*\cs33\cf1\rtlch\af1\lang1033\ltrch\dbch\af1\langfe255\loch\f1\sbasedon32 page number;}
}
{\info{\creatim\yr2002\mo10\dy2\hr22\min13}{\operator Sharon Tuttle}{\revtim\yr2002\mo10\dy2\hr23\min1}{\printim\yr1601\mo1\dy1\hr0\min0}{\comment StarWriter}{\vern6410}}\deftab720
{\*\pgdsctbl
{\pgdsc0\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn1400\margbsxn720\headery0{\*\headeryb283\headerxl0\headerxr0\headeryh0}{\header \pard\plain \s6\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033 
\par }
\pgdscnxt0 Default;}
{\pgdsc1\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn709\margbsxn720\headery0{\*\headeryb283\headerxl0\headerxr0\headeryh0}{\header \pard\plain \s15\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033{\ltrch\loch\f1{\fs16 CS 131 - Homework #5\tab \tab p. {\field{\*\fldinst \\page}{\fldrslt 2}}}}
\par \pard\plain \s15\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\rtlch\afs16\ltrch\dbch\afs16\loch\fs16 {\ltrch\loch\f1 Fall 2002}
\par }
\pgdscnxt1 Convert 1;}}
{\*\pgdscno1}\paperh15840\paperw12240\margl1440\margr1440\margt709\margb720\sectd\sbknone\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn1348\margbsxn720\headery709{\header \pard\plain \s15\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033{\ltrch\loch\f1{\fs16 CS 131 - Homework #5\tab \tab p. {\field{\*\fldinst \\page}{\fldrslt 2}}}}
\par \pard\plain \s15\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\rtlch\afs16\ltrch\dbch\afs16\loch\fs16 {\ltrch\loch\f1 Fall 2002}
\par }
\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
\pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\qc\rtlch\ab\ltrch\dbch\ab\loch\b {\ltrch\loch\f1 CS 131 - Intro to Computer Science I - Fall 2002}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\qc\rtlch\ab\ltrch\dbch\ab\loch\b {\ltrch\loch\f1 Homework #5}
\par {\ltrch\loch\f1 DUE: Friday, October 11th, by {\ul 5:00 pm}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033 
\par {\ltrch\loch\f1 You may work in pairs on this assignment, or individually. Please note, however, the following requirements if you work in a pair:}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li855\ri0\fi-435 {\ltrch\loch\f1 *\tab You must do the whole assignment {\i together}, as a pair (you may not split up the parts, do them individually, and then turn in the combination, for example.)}
\par {\ltrch\loch\f1 *\tab By working in a pair, I mean that both of you are sitting at the {\i same} computer, with one typing ("driving") and the other suggesting/reading over what has been done and what should be done next ("navigating"). The driver and navigator should SWITCH roles
 about every half hour.}
\par {\ltrch\loch\f1 *\tab If you do this, you turn in a single copy of the assignment with both of your names on the first line.}
\par 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033 {\ltrch\loch\f1 As before, you will turn in certain function definitions and expressions that you have typed into the DrScheme definitions window and saved into a file name ending in {\b .scm} .}
\par 
\par {\ltrch\loch\f1 The program recipe in effect for this homework is the same one as from HW #4, and is the same as that given on the course web page.}
\par 
\par {\ltrch\loch\f1 The same general class style guidelines still apply, also:}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435 {\ltrch\loch\f1 *\tab choose meaningful function, parameter, and variable names.}
\par {\ltrch\loch\f1 *\tab use auxiliary functions whenever they are appropriate.}
\par {\ltrch\loch\f1 *\tab reuse functions whenever possible and appropriate. If a function has already been defined for a previous problem within the same definitions file, you may simply use it in a later problem's function.}
\par {\ltrch\loch\f1 *\tab define constant values in your functions as named variables written in all capital letters; for example,}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435\ltrch\loch\f3 {\ltrch\loch\f3 \tab (define CRUST-WIDTH 1)}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435 {\ltrch\loch\f1 *\tab a data definition is not repeated for every function that uses that data; the data definition is only given once in a particular Scheme file. The template for that data definition only has to appear once, as well; HOWEVER, if you find it helpful, you may
 repeat that template before each appropriate function body for which you find that template useful.}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435\ltrch\loch\f3 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435 {\ltrch\loch\f1 In particular: please note that a problem may ask you to write a particular function. When it is appropriate, you should {\b also} write unspecified auxiliary functions that you decide are useful in writing the specifically-requested function.}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435\ltrch\loch\f3 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435 {\ltrch\loch\f1 1.\tab Do exercise 6.3.3 on p. 62 of \ldblquote How to Design Programs (HtDP)\rdblquote . Notice that you {\b do} need to include a data definition and a template, even though those have not yet been covered in that section of the text; WE\rquote VE covered them, at this point.}
\par 
\par {\ltrch\loch\f1 2.}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li855\ri0\fi-435 {\ltrch\loch\f1 a.\tab Do Exercise 6.4.2 on p. 65 of \ldblquote HtDP\rdblquote .}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi0 {\ltrch\loch\f1 \tab }
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li855\ri0\fi-435 {\ltrch\loch\f1 b.\tab Do Exercise 6.5.2 on p. 71 of \ldblquote HtDP\rdblquote .}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi0 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li855\ri0\fi-435 {\ltrch\loch\f1 c.\tab Now, provide a structure definition for representing a {\b quantity} of time (not necessarily since midnight, but expressing time elapsed, for example, or how long a task took, etc.) Call this {\b time-amt}.}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li855\ri0\fi-435 {\ltrch\loch\f1 d. \tab Write a function time-diff, which expects a start time and an end time, and computes how much time has elapsed between those two times. (Be careful: which structures are appropriate in this function\rquote s contract?) (What should your function do if the sta
rt time is AFTER the end time? Make a decision, and include it in your function\rquote s purpose statement.) }
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435 
\par {\ltrch\loch\f1 3.\tab Write a function {\b max-distance} that accepts a jet fighter instance, a starting time, and an ending time, that determines the distance that that jet fighter could travel in that interval, assuming that it was going its top speed for that entire time.}
\par 
\par {\ltrch\loch\f1 Interlude before Problem #4:}
\par \pard\plain \s18\cf1{\*\tlswg8236}\tx1362{\*\tlswg8236}\tx2278{\*\tlswg8236}\tx3194{\*\tlswg8236}\tx4110{\*\tlswg8236}\tx5026{\*\tlswg8236}\tx5942{\*\tlswg8236}\tx6858{\*\tlswg8236}\tx7774{\*\tlswg8236}\tx8690{\*\tlswg8236}\tx9606{\*\tlswg8236}\tx10522{\*\tlswg8236}\tx11438{\*\tlswg8236}\tx12354{\*\tlswg8236}\tx13270{\*\tlswg8236}\tx14186{\*\tlswg8236}\tx15102{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af4\afs20\langfe1033\loch\f4\fs20\li446\ri0\fi0{\ltrch\loch\f1{\b\f1 Please note:}}
\par {\ltrch\loch\f1{\f1 If you want a particular function to perform several sequential drawing actions, you can express them as a single expression using {\b and} (after all, each drawing action returns a boolean, true? And it turns out that, in many programming languages, boolean {\b an
d}{\b0  is implemented by seeing if the first expression is true, and if it is, then seeing if the second expression is true; this works well for drawing functions that return true is they had the desired effect...}) For example, consider the following expression
:}}
\par \pard\plain \s18\cf1{\*\tlswg8236}\tx1362{\*\tlswg8236}\tx2278{\*\tlswg8236}\tx3194{\*\tlswg8236}\tx4110{\*\tlswg8236}\tx5026{\*\tlswg8236}\tx5942{\*\tlswg8236}\tx6858{\*\tlswg8236}\tx7774{\*\tlswg8236}\tx8690{\*\tlswg8236}\tx9606{\*\tlswg8236}\tx10522{\*\tlswg8236}\tx11438{\*\tlswg8236}\tx12354{\*\tlswg8236}\tx13270{\*\tlswg8236}\tx14186{\*\tlswg8236}\tx15102{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af4\afs20\langfe1033\loch\f4\fs20\li446\ri0\fi0\ltrch\loch\f1 
\par \pard\plain \s18\cf1{\*\tlswg8236}\tx1362{\*\tlswg8236}\tx2278{\*\tlswg8236}\tx3194{\*\tlswg8236}\tx4110{\*\tlswg8236}\tx5026{\*\tlswg8236}\tx5942{\*\tlswg8236}\tx6858{\*\tlswg8236}\tx7774{\*\tlswg8236}\tx8690{\*\tlswg8236}\tx9606{\*\tlswg8236}\tx10522{\*\tlswg8236}\tx11438{\*\tlswg8236}\tx12354{\*\tlswg8236}\tx13270{\*\tlswg8236}\tx14186{\*\tlswg8236}\tx15102{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af4\afs20\langfe1033\loch\f4\fs20\li446\ri0\fi0\rtlch\af3\ltrch\loch\f3 {\ltrch\loch\f3 (and (start 400 400) }
\par {\ltrch\loch\f3      (draw-solid-line (make-posn 100 100) (make-posn 300 300))}
\par {\ltrch\loch\f3      (draw-circle (make-posn 200 200) 50 'blue)}
\par {\ltrch\loch\f3      (draw-solid-rect (make-posn 200 300) 75 125 'red))}
\par {\ltrch\loch\f3      (sleep-for-a-while 5)}
\par {\ltrch\loch\f3      (stop)}
\par \pard\plain \s18\cf1{\*\tlswg8236}\tx1362{\*\tlswg8236}\tx2278{\*\tlswg8236}\tx3194{\*\tlswg8236}\tx4110{\*\tlswg8236}\tx5026{\*\tlswg8236}\tx5942{\*\tlswg8236}\tx6858{\*\tlswg8236}\tx7774{\*\tlswg8236}\tx8690{\*\tlswg8236}\tx9606{\*\tlswg8236}\tx10522{\*\tlswg8236}\tx11438{\*\tlswg8236}\tx12354{\*\tlswg8236}\tx13270{\*\tlswg8236}\tx14186{\*\tlswg8236}\tx15102{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af4\afs20\langfe1033\loch\f4\fs20\li446\ri0\fi0\rtlch\af3\ltrch\loch\f3 {\ltrch\loch\f3 )}
\par 
\par \pard\plain \s18\cf1{\*\tlswg8236}\tx1362{\*\tlswg8236}\tx2278{\*\tlswg8236}\tx3194{\*\tlswg8236}\tx4110{\*\tlswg8236}\tx5026{\*\tlswg8236}\tx5942{\*\tlswg8236}\tx6858{\*\tlswg8236}\tx7774{\*\tlswg8236}\tx8690{\*\tlswg8236}\tx9606{\*\tlswg8236}\tx10522{\*\tlswg8236}\tx11438{\*\tlswg8236}\tx12354{\*\tlswg8236}\tx13270{\*\tlswg8236}\tx14186{\*\tlswg8236}\tx15102{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af4\afs20\langfe1033\loch\f4\fs20\li446\ri0\fi0\rtlch\af3\ltrch\loch\f1 {\ltrch\loch\f1 Or, if you are assuming an already open canvas that you do not want to close yet,}
\par 
\par \pard\plain \s18\cf1{\*\tlswg8236}\tx1362{\*\tlswg8236}\tx2278{\*\tlswg8236}\tx3194{\*\tlswg8236}\tx4110{\*\tlswg8236}\tx5026{\*\tlswg8236}\tx5942{\*\tlswg8236}\tx6858{\*\tlswg8236}\tx7774{\*\tlswg8236}\tx8690{\*\tlswg8236}\tx9606{\*\tlswg8236}\tx10522{\*\tlswg8236}\tx11438{\*\tlswg8236}\tx12354{\*\tlswg8236}\tx13270{\*\tlswg8236}\tx14186{\*\tlswg8236}\tx15102{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af4\afs20\langfe1033\loch\f4\fs20\li446\ri0\fi0\rtlch\af3\ltrch\loch\f3 {\ltrch\loch\f3 (and (draw-circle (make-posn 250 250) 120 'black)}
\par {\ltrch\loch\f3      (draw-circle (make-posn 200 200) 40 'blue)}
\par {\ltrch\loch\f3      (draw-circle (make-posn 300 200) 40 'blue)}
\par {\ltrch\loch\f3      (draw-solid-line (make-posn 180 300) (make-posn 320 300) 'red)}
\par {\ltrch\loch\f3      (sleep-for-a-while 3)}
\par {\ltrch\loch\f3      (clear-circle (make-posn 200 200) 40)}
\par {\ltrch\loch\f3      (draw-solid-line (make-posn 160 200) (make-posn 240 200) 'black)}
\par {\ltrch\loch\f3      (sleep-for-a-while 2)}
\par {\ltrch\loch\f3      (clear-solid-line (make-posn 160 200) (make-posn 240 200))}
\par {\ltrch\loch\f3      (draw-circle (make-posn 200 200) 40 'blue)}
\par {\ltrch\loch\f3 )}
\par 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435 {\ltrch\loch\f1 4.\tab Grab the data definition of a {\b circle} from the posted Week 5, Lecture 2 notes. }
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li855\ri0\fi-435 {\ltrch\loch\f1 a.\tab Write functions {\b draw-a-circle} that takes a {\b circle} instance as input, and draws the corresponding circle on an already-opened canvas, and {\b clear-a-circle } that takes a {\b circle} instance as input, and clears the corresponding circle on an already-opened canv
as (and leaves the canvas open).}
\par 
\par {\ltrch\loch\f1 b.\tab Write a function {\b flash-circle} that can accept a {\b circle} and a number of seconds as its input, and draws that circle on an already-opened canvas for that many seconds, and then makes it disappear (but leaves the canvas open).}
\par 
\par {\ltrch\loch\f1 c.\tab Write a function {\b flash-diff-circle }{\b0 that can take a circle, either a center, a radius, or a color, and a number of seconds, that flashes a new circle (different from that passed by the center, radius, or color given) for the number of seconds given (on a
n already opened canvas), and then makes it disappear (still leaving the canvas open).}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435\ltrch\loch\b {\ltrch\loch\f1 5.\tab {\b0 Now, write a function }{\b flash-diff-square}{\b0  that takes a square, one different aspect of a square (what "features" should a square have?), and a number of seconds, and flashes a new square (different from that passed by the feature value given) for the numb
er of seconds given (on an already opened canvas), and the makes it disappear (but leaves the canvas open). It should go without saying that you'll define any structures, variables, and auxiliary functions needed for this along the way... 8-)}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435\rtlch\af3\ltrch\loch\f3 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li450\ri0\fi-435 {\ltrch\loch\f1 When you are done with problems 1-5, save your definitions window contents using the "Save Definitions" command under the File menu. E-mail the contents of this saved file to {\b st10@humboldt.edu}, either by cut-and-paste or attachment or whatever is easiest f
or you. Make the subject line of your message {\b 131hw05}. }
\par }