{\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;}}
{\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\li567\ri0\fi-283\sa120\cf0\tx567{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon2\snext18 Hanging indent;}
{\*\cs20\cf1\rtlch\af1\lang1033\ltrch\dbch\af1\langfe255\loch\f1\sbasedon22 Numbering Symbols;}
{\*\cs21\cf1\rtlch\af1\lang1033\ltrch\dbch\af1\langfe1033\loch\f1\sbasedon22 Default Paragraph Font;}
{\*\cs22\cf1\rtlch\af1\lang1033\ltrch\dbch\af1\langfe255\loch\f1 Normal;}
{\*\cs23\cf1\rtlch\af1\lang1033\ltrch\dbch\af1\langfe255\loch\f1\sbasedon22 WW-Default Paragraph Font;}
{\*\cs24\cf1\rtlch\af1\lang1033\ltrch\dbch\af1\langfe255\loch\f1\sbasedon23 page number;}
}
{\info{\creatim\yr2003\mo8\dy29\hr23\min17}{\operator Sharon Tuttle}{\revtim\yr2003\mo9\dy19\hr9\min28}{\printim\yr1601\mo1\dy1\hr0\min0}{\comment StarWriter}{\vern6410}}\deftab720
{\*\pgdsctbl
{\pgdsc0\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn1400\margbsxn720\pgdscnxt0 Default;}
{\pgdsc1\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn709\margbsxn720\headery0{\*\headeryb0\headerxl0\headerxr0\headeryh691}{\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 #4\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 2003}
\par }
\pgdscnxt1 Convert 1;}}
{\*\pgdscno1}\paperh15840\paperw12240\margl1440\margr1440\margt709\margb720\sectd\sbknone\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn1400\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 #4\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 2003}
\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\afs22\ab\ltrch\dbch\afs22\ab\loch\fs20\b {\ltrch\loch\f1 CS 131 - Intro to Computer Science I - Fall 2003}
\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\afs22\ab\ltrch\dbch\afs22\ab\loch\fs20\b {\ltrch\loch\f1 Homework #4}
\par {\ltrch\loch\f1 DUE: Friday, September 26th, {\ul Beginning} of Lab}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 
\par {\ltrch\loch\f1 You are to work individually on this assignment.}
\par 
\par {\ltrch\loch\f1 You should use {\b funct_play1 }{\b0 or }{\b funct_play2}{\b0  and }{\b expr_play2}{\b0  for this assignment; note that careful contracts, purpose statements, and examples are expected and required. }}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li435\ri0\fi-435\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 Also note the following {\b example/testing guidelines}: }
\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\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 1.\tab you are required to have at least one example for each "category" of data, {\i in addition to}{\i0  at least one (different) example for each "boundary", if there are any, between different categories of data. You may add additional tests, also, of course! But, p
art of your grade may be determined by how complete your sets of examples are.}}
\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\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 
\par {\ltrch\loch\f1 2.\tab you are expected to execute tests (using {\b expr_}play2 or, possibly, {\b funct_play1}) corresponding to each of your examples.}
\par 
\par {\ltrch\loch\f1 3.\tab Read {\b Ex. 4.2.4} on p. 9 of the newest Reading Packet, {\b CS 131 - Reading Packet #6 - Section 4}. When possible/reasonable, you should now formulate your examples/tests as Boolean expressions in this way, as an equality (as:}
\par 
\par {\ltrch\loch\f1 \tab {\f3 fahr_to_cels(32) == 0.0}}
\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\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 
\par {\ltrch\loch\f1 \tab ...rather than as:}
\par \pard\plain \s6\cf0{\*\tlswg8236}\tqc\tx5175{\*\tlswg8236}\tqr\tx9495{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li855\ri0\fi-435\rtlch\afs22\ltrch\dbch\afs22\loch\f3\fs20 
\par {\ltrch\loch\f3 \tab fahr_to_cels(32) should return 0.0}
\par 
\par \pard\plain \s6\cf0{\*\tlswg8236}\tqc\tx5175{\*\tlswg8236}\tqr\tx9495{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li855\ri0\fi-435\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 \tab ...both within your Examples: {\b and} when you actually run your examples as tests using {\b expr_play2} (or possibly using {\b funct_play1}). }
\par 
\par {\ltrch\loch\f1 \tab What if a test "fails" because of tiny fractional differences between a float result and your computation? Follow the so-called "failed" test with a test just calling the function with the same argument, but NOT within a boolean equality. If that verifies
 that the actual result is close to the predicted result, then the test will be considered as passed, for our purposes.}
\par 
\par {\ltrch\loch\f1{\b0 \tab (Note that there {\i will}{\i0  be times as the semester progresses where simply testing a function's result for equality with an expected value will not be possible --- in those situations, you will do as we have been doing, and/or follow the specific example-call
 with text describing what should happen when the function is called with that argument. This will especially be the case when we start programming functions which have }{\i side-effects}{\i0 , which our functions do not have yet.)}}}
\par \pard\plain \s6\cf0{\*\tlswg8236}\tqc\tx6045{\*\tlswg8236}\tqr\tx10365{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li1725\ri0\fi-435\rtlch\afs22\ltrch\dbch\afs22\loch\f3\fs20 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b {\ltrch\loch\f1 LAB #4 LAB EXERCISE: due BEFORE 3 pm on FRIDAY, SEPTEMBER 19th}
\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-420\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 1.\tab Run {\b expr_play2} on cs-server and make sure that you are running the 9-17-03 version; test your copy of{\b  expr_play2 }by trying the boolean expressions:}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li840\ri0\fi-420\rtlch\afs22\ltrch\dbch\afs22\loch\f3\fs20 
\par {\ltrch\loch\f3 3 < 4}
\par {\ltrch\loch\f3 true && false}
\par {\ltrch\loch\f3 false || true}
\par 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li840\ri0\fi-420\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 ...by trying the string expression:}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li840\ri0\fi-420\rtlch\afs22\ltrch\dbch\afs22\loch\f3\fs20 
\par {\ltrch\loch\f3 "hello, world!"}
\par 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li840\ri0\fi-420\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 ...and by trying the char expression:}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li840\ri0\fi-420\rtlch\afs22\ltrch\dbch\afs22\loch\f3\fs20 
\par {\ltrch\loch\f3 'a'}
\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-420\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 \tab If {\i any}{\i0  of the above fail, see me before leaving 9-19's lab, so that I can help you obtain the proper version of {\b expr_play2}{\b0 . Once you have successfully run all 5 of the above expressions, you have completed this lab exercise problem.}}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li840\ri0\fi-420\rtlch\afs22\ltrch\dbch\afs22\loch\f3\fs20 
\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-420\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 2.\tab Trying a boolean function, part 1: do {\b Exercise 4.2.3, part 3 only}{\b0 , in }{\b Reading Packet #6 - Section 4 }{\b0 on }{\b pp. 8-9}{\b0 . You will not have Examples for your particular function, in this case --- simply test it on the values 10, 12, and 14, as requested at the en
d of the problem (using }{\b expr_play2}{\b0  or }{\b funct_play1}{\b0 ).}}
\par 
\par {\ltrch\loch\f1 3.\tab Trying a boolean function, part 2: use {\b funct_play1} or {\b funct_play2} to translate the following interval on the real line into a C++ function that accepts a {\b float} number and returns the {\b\i0 bool} value {\b true} if the number is in the interval and  returns the {\b bool}
  value {\b false} if it is outside:}
\par 
\par {\ltrch\loch\f1 \tab {\f3 the interval (3, 7]}}
\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-420\rtlch\afs22\ltrch\dbch\afs22\loch\f3\fs20 
\par {\ltrch\loch\f3{\b                    (---------------] }}
\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\f3\fs20 {\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-420\ltrch\loch\fs20{\ltrch\loch\f3{\b0\f3        0                   5                  10}}
\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\fs20
\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\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 Note that named constants are {\b not} required for the interval boundaries in these interval practice functions for this particular homework (although they would be for a "real" program using an interval, because such an interval's "boundaries" are likely to t
hen have a meaning where a name would be useful!)}
\par 
\par {\ltrch\loch\f1 Be sure to include examples, and then corresponding tests (using {\b expr_play2}{\b0  or }{\b funct_play1}{\b0 )}, for all "categories" of data, as well as their "boundaries", at the least. Write these as equality expressions as discussed in {\b #3}{\b0  of the }{\b examples/testing guideline
s}{\b0  at the beginning of this homework handout.}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 
\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-420\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b {\ltrch\loch\f1 HOMEWORK #4: due BY 1:00 PM on FRIDAY, SEPTEMBER 26th}
\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-420\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 1.\tab Do {\b Exercise  4.2.1 }in {\b Reading Packet #6 - Section 4 }that starts on {\b p. 6}. Note that you have already completed the first interval once you have completed the lab exercise; now continue with the other four intervals. (If for some reason you didn't complet
e the lab exercise, then do the first interval as part of this problem...)}
\par 
\par {\ltrch\loch\f1 2.\tab {\f1 Do {\b Exercise  4.4.2} in{\b  Reading Packet #6 - Section 4 }on {\b p. 19}, except name the functions {\b tax2} and {\b netpay2}. Use the assumptions stated, and note that overtime is {\i not}{\i0  possible for this particular problem; also be careful to use the parameters specified for
 {\b tax2} and {\b netpay2}.}}}
\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-420\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 
\par {\ltrch\loch\f1 3.\tab Do {\b Exercise  4.4.4} in{\b  Reading Packet #6 - Section 4} that starts on {\b p. 19}, except that you do not need to turn in an answer for the question ("How would the function change...?") at the end. Also note that I will not see your "by-hand" determinations tha
t you make along the way, either.}
\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\fs20 {\ltrch\loch\f1 4.\tab (Adapted from Keith Cooper's section of Rice University's COMP 210, Spring 2002)}
\par {\ltrch\loch\f1 \tab Conditionals (and Pizza Economics)}
\par 
\par {\ltrch\loch\f1 \tab In class, we have developed a series of programs intended to deal with some of the economic and geometric aspects of eating pizza. Our set of programs, however, ignores an important consequence of increased pizza consumption \endash -the need for additional exer
cise.}
\par 
\par {\ltrch\loch\f1 \tab Develop a function{\b  workOut }that computes the number of hours of exercise required to counter the excess fat from eating pizza. {\b workOut} consumes a number that represents daily pizza consumption, in slices, and returns a number, in hours, that represents th
e amount of exercise time that you need.}
\par 
\par {\ltrch\loch\f1 \tab For a daily intake of :\tab \tab \tab \tab You need to work out for :}
\par {\ltrch\loch\f1 \tab 0 slices \tab \tab \tab \tab \tab \tab 1/2 hour}
\par {\ltrch\loch\f1 \tab 1 to 3 slices \tab \tab \tab \tab \tab 1 hour}
\par {\ltrch\loch\f1 \tab >3 slices \tab \tab \tab \tab \tab 1 hour +1/2 hour per slice above 3}
\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\rtlch\afs22\ltrch\dbch\afs22\loch\fs20{\ltrch\loch\f1{\i0\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\li420\ri0\fi-420\rtlch\afs22\ab\ltrch\dbch\afs22\ab\loch\fs20\b 
\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-450\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 
\par }