{\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\li567\ri0\fi-283\sa120\cf0{\*\tlswg8236}\tx567{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon2\snext3 Hanging indent;}
{\s4\sb240\sa120\keepn\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs28\lang1033\ltrch\dbch\afs28\langfe1033\loch\fs28\lang1033\sbasedon1\snext2 Heading;}
{\s5\li360\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;}
{\s6\li720\ri0\fi-360\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext6 List 2;}
{\s7\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\snext7 Header;}
{\s8\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon2\snext8 Table Contents;}
{\s9\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\sbasedon8\snext9 Table Heading;}
{\s10\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext10 Index;}
{\s11\sb240\sa60\cf0\qc{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs32\lang1033\ab\ltrch\dbch\afs32\langfe1033\ab\loch\fs32\lang1033\b\sbasedon1\snext12 Title;}
{\s12\sa60\cf0\qc{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs24\lang1033\ltrch\dbch\afs24\langfe1033\loch\fs24\lang1033\sbasedon1\snext2 Subtitle;}
{\s13\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe255\loch\f1\fs24\sbasedon1\snext13 Normal;}
{\s14\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;}
{\s15\keepn\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ab\ltrch\dbch\af1\afs20\langfe255\ab\loch\f1\fs20\b\sbasedon13\snext13 heading 2;}
{\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 header;}
{\s17\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\snext17 footer;}
{\s18\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\snext18 caption;}
{\*\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\mo10\dy10\hr9\min52}{\printim\yr2003\mo10\dy10\hr9\min12}{\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 \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{\ltrch\loch\f1{\fs16 CS 131 - Homework #6\tab \tab p. {\field{\*\fldinst \\page}{\fldrslt 4}}}}
\par \pard\plain \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\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 \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{\ltrch\loch\f1{\fs16 CS 131 - Homework #6\tab \tab p. {\field{\*\fldinst \\page}{\fldrslt 4}}}}
\par \pard\plain \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\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 LAB #6 EXERCISE and Homework #6}
\par 
\par {\ltrch\loch\f1 lab #6 exercise due: Friday, October 10th, END of lab}
\par {\ltrch\loch\f1 HW #6 due: Friday, October 17th, {\ul beginning}{\ulnone  of lab}}
\par 
\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 {\ltrch\loch\f1 You are to work individually on this assignment.}
\par 
\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 {\ltrch\loch\f1 You are {\b not} required to use funct_play1, funct_play2, or expr_play2 for this assignment (although you are always welcome to, if you wish). You do need to e-mail me the files specified below (as specified in HW #5 --- {\b not} as attachments, and with one file p
er message, with a Subject: line of the file name, and with a copy CC'd to yourself).}
\par 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\ul\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b {\ltrch\loch\f1 NOTES {\b0 on the C++ }string {\b0 type:}}
\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 {\b reminder:} remember, when you use the {\b string} type, you should also {\b #include <string>} at the beginning of each file using {\b string}.}
\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{\ltrch\loch\f1{\b0\fs20 \tab It is also possible that you will need to put {\b #include <string> }in the {\b .h }file(s) as well --- this appears most likely to be needed if a function header involves the type {\b string}{\b0 . (It kind of makes sense --- C++ needs to know how to handle the type }{\b string}{\b0 ,
 after all, and in this case it is right there as part of the function header...) I}f you get an error message complaining about string when compiling a program using a function involving a string, try adding this there, and see if that helps.}}
\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 \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\f1{\fs20{\b0 *\tab }{\b new information}{\b0 : the }{\b string}{\b0  type supports }{\b +}{\b0  as a string }{\b concatenation}} {\b0 operator.}}
\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 {\ltrch\loch\f1 *\tab if {\b str1} and {\b str2} are declared to be of type {\b string}, then {\b str1 + str2} is a valid expression whose result is a new {\b string}, the string resulting from {\b concatenating}, or combining, {\b str1} and {\b str2} together (in that order). No additional characters are added ---
 no blank is added in between --- the result is just a new string with the contents of both {\b str1} and {\b str2}.}
\par 
\par {\ltrch\loch\f1 *\tab so...}
\par 
\par {\ltrch\loch\f1 \tab {\f3 #include <string>}}
\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\ltrch\loch\f3 {\ltrch\loch\f3 \tab using namespace std;}
\par 
\par {\ltrch\loch\f3 \tab ...}
\par 
\par {\ltrch\loch\f3 \tab string str1, str2, str3;}
\par 
\par {\ltrch\loch\f3     str1 = "hi";}
\par {\ltrch\loch\f3     str2 = "there";}
\par {\ltrch\loch\f3     str3 = str1 + str2;}
\par 
\par {\ltrch\loch\f3     cout << str3 << endl;}
\par 
\par {\ltrch\loch\f3 \tab {\f1 ...would cause }{\b hithere} {\f1 to be written to the screen.}}
\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 
\par {\ltrch\loch\f1 *\tab A string literal is actually the "old" type of cstring, although happily C++ converts the old to the new when you say (as shown above) {\b str1 = "hi";} . It is also "smart" enough to do {\b string} concatenation when you use + between a {\b string} variable and a {\b cstr
ing} literal ( {\b str1 + "george" }).  (This is similar to how C++ uses {\b float }multiplication when you multiply a {\b float} and an {\b int }( {\b 3 * 5.2} ).}
\par 
\par {\ltrch\loch\f1 \tab However, note that you CANNOT concatenate two string literals using {\b + ---} for example, you cannot say  ({\b "hi" + "there"} ) --- because the old cstring type does NOT support +, and at that point both are old cstring's. (You could CAST, or convert, one of the
m to be a {\b string}, but that's a topic for a bit later...)}
\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\ul\ltrch\loch\b {\ltrch\loch\f1 LAB #6 EXERCISE}
\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\f1{\ulnone *\tab {\fs20 Consider problem #2 below. You can choose to either do it first, or to do #1 and then do #2 (depending on how long you think you'll need for #1); but, either way, before you leave lab today, call me over and {\b run}{\b0 , as I am watching, your }{\b testProf}{\b0  and }{\b tryPr
of}{\b0  . If both successfully run (and }{\b tryProf}{\b0  meets the stated specifications), then you will receive full credit for this lab exercise. (You will still turn in the necessary files as specified for #2 as part of HW #6.)}}}}
\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-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b {\ltrch\loch\f1 1.}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li825\ri0\fi-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b {\ltrch\loch\f1 (a){\b0  \tab Write a function }alphaForm{\b0  (in a file }alphaForm.cpp{\b0 ) that expects 3 arguments, the first a first name (given as a string), the second a middle name (given as a string), and the third a last name (given as a string). It returns a single string, consist
ing of the last name, then a comma, then a blank, then the first name, then a blank, then the middle name. (That is, it converts the name in separate pieces into a single name that might be suitable for being more easily alphabetized by last name later.) }}
\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-405\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\li825\ri0\fi-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 \tab 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\li825\ri0\fi-405\rtlch\afs22\ltrch\dbch\afs22\loch\f3\fs20\b {\ltrch\loch\f3 \tab alphaForm("Grace", "Murray", "Hopper") == "Hopper, Grace Murray"}
\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-405\rtlch\afs22\ltrch\dbch\afs22\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\li825\ri0\fi-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b {\ltrch\loch\f1 \tab {\b0 Be sure that this includes all of the usual program design recipe elements  (contract, purpose, examples).}}
\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-405\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\li825\ri0\fi-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20{\ltrch\loch\f1{\b (b)}\tab Of course, you need to test the above --- consider the posted code "template" {\b testTemplate.cpp}, available along with this homework assignment on the course web page.}
\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-405\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\li825\ri0\fi-405{\ltrch\loch\f1{\b0\fs20\f1 \tab This is a {\b0 rough beginning of a template, but if} you add in all of the needed #include's, replace all FUNCT's with your new function's name, (such as alphaForm), insert your Examples from your new function, edit in reasonable variables for your new functio
n's arguments, and fix all of the comments appropriately, then this template will guide you to create {\b test_alphaForm.cpp}, which runs your Examples as tests and then loops (as long as the user desires) prompting him/her to enter additional tests by hand. }}
\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-405\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\li840\ri0\fi-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 \tab (Note that you will need to add {\b #include <string> }to {\b alphaForm.h}, as mentioned above.)}
\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-405\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\li825\ri0\fi-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 \tab Use {\b testTemplate.cpp} to create {\b test_alphaForm.cpp}, compile and run it, and make sure your {\b alphaForm}  tests (based on its Examples) pass.}
\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-405\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-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b {\ltrch\loch\f1 2.\tab {\b0 Now, you'll also see }Prof.h{\b0  on the course web page in the same section as this homework, also. It is similar to the example discussed in class on Wednesday, October 8th.}}
\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-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 
\par {\ltrch\loch\f1 \tab You can {\b copy} a compiled implementation file {\b Prof.o} that goes with{\b  Prof.h }to your current working directory as follows:}
\par 
\par {\ltrch\loch\f1 \tab {\b\f3 cp ~st10/f03cs131_public/Prof.o Prof.o}}
\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-405\rtlch\afs22\ltrch\dbch\afs22\loch\f3\fs20\b 
\par {\ltrch\loch\f3 \tab {\f1 testProf.cpp {\b0 is a rather thorough testing program available from the course web page (also in the same section as this homework) that exercises this class's constructor, accessor functions, and mutator functions. Compile and run this (}}g++ -o testProf test
Prof.cpp Prof.o{\b0\f1 ). Make sure that you understand what it is doing, and what its output is showing.}}
\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-405\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-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b{\ltrch\loch\f1{\b0 \tab Write a small main function in file }tryProf.cpp{\b0  that creates an instance of Prof (a Prof }object{\b0 ), calls the constructor to instantiate that instance, calls at least one accessor function for your Prof object and prints out its  value, and calls at least o
ne mutator function, then calling and printing out the returned value for the corresponding accessor function to verify that the mutator call did its work. Compile and run this until you are confident that it is doing what it should.}}
\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-405\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-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b {\ltrch\loch\f1 3.\tab {\b0 Now consider }alphaForm{\b0  again. }}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li825\ri0\fi-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b {\ltrch\loch\f1 (a){\b0 \tab Our {\b Prof}{\b0  class has separate name fields --- it would be nice to be able to "grab" a nicely formatted "complete" name from an object of class {\b Prof}. Write} }alphaForm2.cpp{\b0 , that expects a }Prof{\b0  argument, but that returns a single string of the same form tha
t {\b alphaForm}{\b0  does}. That is,}}
\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-405\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\li825\ri0\fi-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 \tab {\f3 Prof cs131_prof("Tuttle", "Sharon", "Marie", "Dr.", "st10", }}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li825\ri0\fi-405\rtlch\afs22\ltrch\dbch\afs22\loch\f3\fs20 {\ltrch\loch\f3                     "M-Th 3:15-4:15", 7.98);}
\par {\ltrch\loch\f3 \tab cout << alphaForm2(cs131_prof) << endl;}
\par 
\par {\ltrch\loch\f3 \tab {\f1 ...would cause {\b Tuttle, Sharon Marie} to be printed to the screen.}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li825\ri0\fi-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 
\par {\ltrch\loch\f1 \tab (Note that {\b alphaForm2.cpp} needs to {\b #include "Prof.h"} .) }
\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-405\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\li825\ri0\fi-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b {\ltrch\loch\f1 (b)\tab {\b0 Create }test_alphaForm2.cpp{\b0  (analogous to }test_alphaForm.cpp{\b0 ) to test your function }alphaForm2{\b0 .}}
\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-405\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-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b {\ltrch\loch\f1 4.\tab {\b0 The nice thing about an object having "separate" name fields is that they can be used more flexibly in different ways. Let's say that I'd also like to be able, as desired, to obtain the name of a Prof as I would use it in a mailing label, or in a return
 address in a business letter. }}
\par 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li825\ri0\fi-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b {\ltrch\loch\f1 (a){\b0 \tab Create }mailingForm.cpp{\b0  that accepts an object of class }Prof{\b0  and returns a single string of the form title, then a blank, first name, then a blank, middle name, then a blank, and last name, then a blank.}}
\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-405\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\li840\ri0\fi-420\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 \tab That is,}
\par 
\par {\ltrch\loch\f1 \tab {\f3 Prof cs131_prof("Tuttle", "Sharon", "Marie", "Dr.", "st10", }}
\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 {\ltrch\loch\f3                     "M-Th 3:15-4:15", 7.98);}
\par {\ltrch\loch\f3 \tab cout << mailingForm(cs131_prof) << endl;}
\par 
\par {\ltrch\loch\f1{\f1 \tab ...would cause {\b Dr. Sharon Marie Tuttle} to be printed to the screen.}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li825\ri0\fi-405\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\li825\ri0\fi-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b {\ltrch\loch\f1 (b)\tab {\b0 Create }test_mailingForm.cpp{\b0  (analogous to }test_alphaForm.cpp {\b0 and }test_alphaForm2.cpp{\b0 ) to test your function {\b mailingForm}.}}
\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-405\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-405{\ltrch\loch\f1{\b\fs20\f1 5.\tab {\b0 (Adapted from Keith Cooper's section of Rice University's COMP 210, Spring 2002)}}}
\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-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 \tab Manipulating Cartesian Coordinates}
\par 
\par {\ltrch\loch\f1 \tab Consider a point in 3-dimensional space. }
\par 
\par {\ltrch\loch\f1 \tab In 2-dimensional space, we talk about the x-axis and y-axis, correct? And a point is then defined by the pair }
\par {\ltrch\loch\f1 \tab (x, y).\tab }
\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-405\rtlch\afs22\ltrch\dbch\afs22\loch\f3\fs20 {\ltrch\loch\f3 \tab y-axis}
\par {\ltrch\loch\f3 \tab  ^}
\par {\ltrch\loch\f3 \tab  |}
\par {\ltrch\loch\f3 \tab 3-}
\par {\ltrch\loch\f3 \tab  |}
\par {\ltrch\loch\f3 \tab 2-     .\tab \tab \tab <--- the point (3, 2)}
\par {\ltrch\loch\f3 \tab  |}
\par {\ltrch\loch\f3 \tab 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-405{\ltrch\loch\f3{\b0\fs20\f3 \tab  |_|_|_|_|_|_>}}
\par {\ltrch\loch\f3{\b0\fs20\f3 \tab  0 1 2 3 4 5   x-axis}}
\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-405\rtlch\afs22\ltrch\dbch\afs22\loch\f3\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-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b{\ltrch\loch\f1{\b0 \tab In 3-dimensional space, then, we have the x-axis and y-axis, and also a z-axis (think of it as pointing out of the paper, right up at you! 8-) ). A point defined in 3-dimensions is then considered to be defined as (x, y, z), its location on the x-axis, th
e y-axis, and the z-axis. }}
\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-405\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 
\par {\ltrch\loch\f1 \tab We have decided that we'd like to make a class {\b Point3}{\b0  that embodies this notion of a point in three-dimensional space. For historical reasons, we will have the }{\b member variables}{\b0  of }{\b Point3} be called{\b  x{\b0 ,} y{\b0 , and} z{\b0  (these names are traditional, and considered r
eadable within this scenario).} }}
\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 
\par {\ltrch\loch\f1 \tab I have provided a compiled implementation for this class, {\b Point3.o}{\b0 , which you can copy into your current working directory using:}}
\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 
\par {\ltrch\loch\f1 \tab {\b\f3 cp ~st10/f03cs131_public/Point3.o Point3.o}}
\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\f3\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\li840\ri0\fi-435\rtlch\afs22\ltrch\dbch\afs22\loch\f3\fs20\b{\ltrch\loch\f1{\f1 (a)}\tab {\f1{\b0 If you name the necessary accessor functions using }get_*{\b0 , and name the necessary mutator functions using }set_*{\b0 , analogously to how is done in }Prof.h{\b0 , then you should be able to write the }Point3.h{\b0  corresponding to this }Point3.o{\b0 . In this case, we do inde
ed want a constructor that allows the user to specify all 3 coordinates of the new point, an accessor function for each member variable, and a mutator function for each member variable.}}}
\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-435\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 
\par {\ltrch\loch\f1 \tab Write {\b Point3.h}.}
\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-435\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b {\ltrch\loch\f1 (b)\tab {\b0 Of course, you need to be able to see if you have set up }Point3.h{\b0  appropriately. Write a main function in file }testPoint3.cpp{\b0  that:}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li1290\ri0\fi-435\rtlch\afs22\ltrch\dbch\afs22\loch\fs20\b{\ltrch\loch\f1{\b0 *\tab creates an instance of Point3 (a Point3 }object{\b0 ),}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li1290\ri0\fi-435\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 
\par {\ltrch\loch\f1 *\tab calls the constructor to instantiate that instance,}
\par 
\par {\ltrch\loch\f1 *\tab calls each of the accessor functions for your Point3 object and prints out their returned values (testing both the constructor and the accessors, note!), and}
\par 
\par {\ltrch\loch\f1 *\tab calls each of the mutator functions, then calling and printing the returned result of the corresponding accessor functions to verify that each mutator call did its work.}
\par 
\par {\ltrch\loch\f1 Compile and run this until you are confident that it is doing what it should.}
\par 
\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\b {\ltrch\loch\f1 (c)\tab {\b0 Now that you have class }Point3{\b0 , you can use it in other functions. Write a function }point3Add{\b0  (in {\b point3Add.cpp}{\b0 ) that} expects two }Point3{\b0  instances, and returns a }Point3{\b0  instance whose coordinates are the }sum{\b0  of the coordinates of the two }Point3{\b0  argumen
ts.}}
\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 Also write a test program in {\b test_point3Add.cpp} to run all of your Examples from {\b point3Add}. Base it on {\b testTemplate.cpp}. }
\par 
\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{\b0\fs20\f1 \tab (Note that, since you cannot use == to compare two {\b Point3} instances, and since our class does not (yet! 8-) ) include a member function for creating a {\b string}{\b0  depiction of a Point3 object, you will need to be creative to show what's expected and what's act
ual, in testing }{\b point3Add}{\b0 . You can simply print out a string showing what's expected --- that's easy. To show what }{\b point3Add}{\b0  actually returned, however, you only have the }{\b accessor}{\b0  functions for Point3 available. So, you will need to print out the results o
f calling those accessor functions on the new Point3 returned by }{\b point3Add }{\b0 in order to complete each Point3 test.)}}}
\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 \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\b {\ltrch\loch\f1 (d)\tab {\b0 This is a bit trickier, and you may have to do a bit of research to find/determine the correct formula (a standard mathematical/geometry reference, or careful use of Google, etc.)}}
\par 
\par {\ltrch\loch\f1{\b0 \tab Write a function }distance{\b0  that expects two }Point3{\b0  instances and computes the distance between two points. }}
\par 
\par {\ltrch\loch\f1{\b0 \tab (Remember: the }cmath{\b0  library --- }#include <cmath>{\b0  --- has a }sqrt{\b0  function that accepts a float or double and returns the square root of that argument. If it complains about storing the result in a }float{\b0 , then store the result in a }double {\b0 (double-precision
 floating point type).}}
\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 Also write a test program in {\b test_distance.cpp}{\b0  to run all of your Examples from }{\b distance}{\b0 . Base it on }{\b testTemplate.cpp}{\b0  (and remember the how-to-show-test-results comments from part \'a9 above).}}
\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-405\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\li0\ri0\fi-15\ltrch\loch\fs20{\ltrch\loch\f1{\b0\i0 \tab Throughout the homework, IF you create any helper functions, be sure to e-mail them to me along with your other homework files.}}
\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 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li-15\ri0\fi0\rtlch\afs22\ltrch\dbch\afs22\loch\fs20 {\ltrch\loch\f1 Remember --- when you are done with this homework, you should have sent me at least 13 e-mail messages, one each for {\b alphaForm.cpp}{\b0 , }{\b test_alphaForm.cpp}{\b0 , }{\b tryProf.cpp}{\b0 , }{\b alphaForm2.cpp}{\b0 , }{\b test_alphaForm2.cpp}{\b0 , }{\b mailingForm.cpp}{\b0 , }{\b test_mailingForm.cpp}{\b0 , }{\b Point3.h}{\b0 , }{\b testP
oint3.cpp}{\b0 , }{\b point3Add.cpp}{\b0 , }{\b test_point3Add.cpp}{\b0 , }{\b distance.cpp}{\b0 , }{\b test_distance.cpp}{\b0 .}}
\par 
\par 
\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 
\par }