{\rtf1\ansi\deff0\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman{\*\falt Thorndale};}{\f1\froman\fprq2\fcharset0 Times New Roman{\*\falt Thorndale};}{\f2\froman\fprq2\fcharset0 Times New Roman;}{\f3\fmodern\fprq1\fcharset0 Courier New{\*\falt Cumberland};}{\f4\fnil\fprq2\fcharset0 HG Mincho Light J;}{\f5\fnil\fprq2\fcharset0 Arial Unicode MS;}}
{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
{\stylesheet{\s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\snext1 Default;}
{\s2\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af3\afs20\lang255\ltrch\dbch\af3\afs20\langfe255\loch\f3\fs20\lang1033\sbasedon1\snext2 Preformatted Text;}
{\s3\cf1\tqc\tx4320\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\sbasedon1\snext3 Header;}
{\*\cs5\cf1\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033 WW-Default Paragraph Font;}
{\*\cs6\cf1\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\sbasedon5 Page Number;}
}
{\info{\author Sharon Tuttle}{\creatim\yr2002\mo9\dy26\hr8\min15}{\operator Sharon Tuttle}{\revtim\yr2003\mo9\dy25\hr17\min5}{\printim\yr2002\mo9\dy26\hr9\min53}{\comment StarWriter}{\vern6410}}\deftab1250
{\*\pgdsctbl
{\pgdsc0\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\headery0{\*\headeryb283\headerxl0\headerxr0\headeryh0}{\header \pard\plain \s3\cf1\tqc\tx4320\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033{\ltrch\loch\f0{\fs16 CS 131 - Midterm #1 Study Suggestions\tab \tab p. }{\field{\*\fldinst \\page}{\fldrslt 4}}{\*\cs6\cf1\rtlch\ltrch\dbch\loch\f0\fs24\lang1033\fs16 }}
\par \pard\plain \s3\cf1\tqc\tx4320\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\ltrch\loch\fs16 {\ltrch\loch\f0 Fall 2003}
\par }
\pgdscnxt0 Default;}}
\paperh15840\paperw12240\margl1800\margr1800\margt1440\margb1440\sectd\sbknone\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn2093\margbsxn1440\headery1440{\header \pard\plain \s3\cf1\tqc\tx4320\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033{\ltrch\loch\f0{\fs16 CS 131 - Midterm #1 Study Suggestions\tab \tab p. }{\field{\*\fldinst \\page}{\fldrslt 4}}{\*\cs6\cf1\rtlch\ltrch\dbch\loch\f0\fs24\lang1033\fs16 }}
\par \pard\plain \s3\cf1\tqc\tx4320\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\ltrch\loch\fs16 {\ltrch\loch\f0 Fall 2003}
\par }
\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
\pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\qc\ltrch\loch\f2 {\ltrch\loch\f2 CS 131 - Fall 2003}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\qc\ltrch\loch\f2\b {\ltrch\loch\f2 Midterm #1 Study Suggestions}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\ltrch\loch\f2 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab remember: anything covered in assigned course reading, in lecture, or on a homework, is FAIR GAME.}
\par 
\par {\ltrch\loch\f2 *\tab {\b0 you are responsible for the material through {\b Reading Packet #6 - Section 4 }and through {\b HW #4}}}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 
\par {\ltrch\loch\f2 *\tab these are simply suggestions of some especially important concepts, to help you in your studying.}
\par 
\par {\ltrch\loch\f2 *\tab you will be both writing and reading C++ functions on this exam, as well as fragments of C++ code (including statements and expressions).}
\par 
\par {\ltrch\loch\f2 *\tab what is syntax? what is semantics? }
\par 
\par {\ltrch\loch\f2 *\tab what C++ data types have we discussed so far?}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li855\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab how can you write values (literals) for each of these data types?}
\par 
\par {\ltrch\loch\f2 *\tab how can you write a parameter declaration for a parameter of each of these data types? how can you write a named constant declaration for a named constant of each of these data types?}
\par 
\par {\ltrch\loch\f2 * \tab what are the functions that we have discussed so far that are provided by C++ (or its {\b cmath }library) for each of these data types?}
\par 
\par {\ltrch\loch\f2 *\tab look at a C++ value or C++ expression and give its type; write a C++ value of C++ expression of a particular type;}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 
\par {\ltrch\loch\f2 *\tab how do you write arithmetic expressions in C++?}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li855\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab what are some of the arithmetic operations/functions provided by C++ (and its {\b cmath} library)?}
\par 
\par {\ltrch\loch\f2 *\tab Given an arithmetic operation in "algebraic" form, write it as an equivalent C++ expression;}
\par 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab how do you write Boolean expressions in C++? }
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li855\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab what are some of the operators provided by C++ that return a {\b bool} value?}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li1275\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab what are the relational operators provided by C++?}
\par 
\par {\ltrch\loch\f2{\b0 *\tab what are the Boolean operators provided by C++?}}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li855\ri0\fi-435\ltrch\loch\f2 
\par {\ltrch\loch\f2 *\tab Given a description of a desired Boolean expression, write it as an equivalent C++ expression;}
\par 
\par {\ltrch\loch\f2 *\tab What are the two possible literals of C++'s {\b bool}{\b0  type?}}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 
\par {\ltrch\loch\f2 *\tab what is a parameter? how can you declare a parameter in C++?}
\par 
\par {\ltrch\loch\f2 *\tab when an identifier/variable represents an unchanging value within a program, we call it a "named constant";}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li840\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab why are these good to use within programs?}
\par 
\par {\ltrch\loch\f2 *\tab How do you declare a named constant in C++?}
\par 
\par {\ltrch\loch\f2 *\tab (Note that we have a style standard that such named constants should be written in all-uppercase.)}
\par 
\par {\ltrch\loch\f2 *\tab (Note that we also have a class style standard that named constants should be used in place of literals within code.)}
\par 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab what is a comment? How can you write a comment in C++?}
\par 
\par {\ltrch\loch\f2 *\tab functions in C++}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li855\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab what is a function header? what is a function body?}
\par 
\par {\ltrch\loch\f2 *\tab be able to read, write functions, using the program design recipe;}
\par 
\par {\ltrch\loch\f2 *\tab given a function and a call of that function, tell what that function will return;}
\par 
\par {\ltrch\loch\f2 *\tab given a function, be able to write a call of that function;}
\par 
\par {\ltrch\loch\f2 *\tab be able to write expressions including appropriate function calls;}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 
\par {\ltrch\loch\f2 *\tab how should parameters and named constants be named? how should functions be named?}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li855\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab remember that any name that a programmer chooses is called an {\b identifier} --- what is the basic syntax for a C++ identifier?}
\par 
\par {\ltrch\loch\f2 *\tab Given a would-be identifier --- tell if it is a "legal" C++ identifier (if it would be an accepted by a C++ compiler as a syntactically-correct identifier);}
\par 
\par {\ltrch\loch\f2{\b0 *\tab Given a scenario, judge if an identifier would be a descriptive, meaningful choice for a particular purpose within that scenario;}}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 
\par {\ltrch\loch\f2 *\tab what do we mean by an {\b auxiliary}{\b0  function?}}
\par 
\par {\ltrch\loch\f2 *\tab what is an argument? what is a parameter?}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li855\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab given a fragment of C++ code, could you name the arguments in that fragment? could you name the parameters in that fragment?}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 
\par {\ltrch\loch\f2 *\tab what is a syntax error? what is a semantic/logical error? what is a run-time error?}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li855\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 * \tab given a fragment of C++ code, characterize an error within that code as a syntax error, a semantic/logical error, or a run-time error;}
\par 
\par {\ltrch\loch\f2 *\tab be able to give an example of each of these categories of errors, if asked;}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 
\par {\ltrch\loch\f2 *\tab you should be comfortable with the design recipe (since you should have been using it for many of the numerous functions that you have written at this point).}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li840\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab there could be questions about the design recipe itself; you should also be comfortable with the expected order of the steps in this process.}
\par 
\par {\ltrch\loch\f2 *\tab there could also be questions where you have to produce certain steps within the design recipe.}
\par 
\par {\ltrch\loch\f2 *\tab if the scenario for a problem is given, be able to:}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li1290\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab perform data analysis and design a data definition, if appropriate, for the kinds of data involved in that problem;}
\par 
\par {\ltrch\loch\f2 *\tab give the {\b contract} for each desired function involved in solving that problem;}
\par 
\par {\ltrch\loch\f2 *\tab give the {\b header} for each desired function involved;}
\par 
\par {\ltrch\loch\f2 *\tab write an appropriate {\b purpose statement} for each desired function involved, being sure to make appropriate use of the parameter names within it;}
\par 
\par {\ltrch\loch\f2 *\tab come up with {\b examples} for each desired function involved,}
\par 
\par {\ltrch\loch\f2 *\tab come up with an appropriate {\b body},}
\par 
\par {\ltrch\loch\f2 *\tab come up with appropriate {\b tests;}}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li1290\ri0\fi-435\ltrch\loch\f2\b 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab branch structure/C++ if-statement}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li855\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab what are the 4 basic structures of programming? (sequence, branch, procedure/function, and repetition)}
\par 
\par {\ltrch\loch\f2 *\tab what is one of the statements that C++ provides for implementing the branch structure?}
\par 
\par {\ltrch\loch\f2 *\tab what is the syntax of the C++ if-statement? What are its semantics?}
\par 
\par {\ltrch\loch\f2 *\tab be comfortable reading and writing if-statements; be comfortable reading and writing conditional functions;}
\par 
\par {\ltrch\loch\f2 *\tab what (according to our class style standards) are the minimum examples/tests that should be included for a conditional function?}
\par 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab numeric intervals}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li855\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab should be comfortable reading and writing numeric intervals as discussed in lecture and in the assigned reading;}
\par 
\par {\ltrch\loch\f2 *\tab given a marked number line, write the equivalent interval; given an interval, be able to mark a number line so that it corresponds to that interval.}
\par 
\par {\ltrch\loch\f2 *\tab be able to write a C++ function that determines whether an argument is within a specified interval or not;}
\par 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab class style standard: anything within a block (\{ \}) MUST be indented noticeably (by at least 3 spaces)}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li855\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 *\tab this is true for *any* block, whether it is a function body, an if-condition, an else-condition, etc.;}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 
\par {\ltrch\loch\f2 *\tab (note that there could be questions about the class style standards, and your grade for test questions may be affected by whether you follow those class style standards in your answers.)}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af5\afs24\lang255\ltrch\dbch\af4\afs24\langfe255\loch\f0\fs24\lang1033\li840\ri0\fi-435\ltrch\loch\f2 
\par }