{\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\fnil\fprq2\fcharset0 HG Mincho Light J;}{\f4\fnil\fprq2\fcharset0 Arial Unicode MS;}}
{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
{\stylesheet{\s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\snext1 Default;}
}
{\info{\author Sharon Tuttle}{\creatim\yr2003\mo2\dy18\hr10\min55}{\operator Sharon Tuttle}{\revtim\yr2003\mo2\dy18\hr15\min26}{\printim\yr1601\mo1\dy1\hr0\min0}{\comment StarWriter}{\vern6410}}\deftab1250
{\*\pgdsctbl
{\pgdsc0\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\pgdscnxt0 Default;}}
\paperh15840\paperw12240\margl1800\margr1800\margt1440\margb1440\sectd\sbknone\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
\pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\qc\ltrch\loch\f2\b {\ltrch\loch\f2 CS 132 Midterm #1 - Study Suggestions}
\par 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab {\b last modified: 2-18-03}}
\par 
\par {\ltrch\loch\f2 *\tab everything discussed/involved in assigned reading, lectures, labs, and homework assignments and examples is fair game. The test covers through HW #3, and material through the 2-18 lecture (except that lists will {\b not} be on this particular test).}
\par 
\par {\ltrch\loch\f2 *\tab But, these are some especially-significant topics to help you in your studying for the midterm.}
\par 
\par {\ltrch\loch\f2 *\tab You are responsible for being familiar with, and following, the class {\b style} guidelines.}
\par 
\par {\ltrch\loch\f2 *\tab Java basics and details}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li840\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab how do you declare variables in Java? write expressions in Java? write branches in Java?}
\par 
\par {\ltrch\loch\f2 *\tab what are some of Java's primitive types? built-in types?}
\par 
\par {\ltrch\loch\f2 *\tab how can you be sure of the order of operations in a Java expression?}
\par 
\par {\ltrch\loch\f2 *\tab what is the type of a given Java expression?}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li1275\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab when do you get integer division? double division?}
\par 
\par {\ltrch\loch\f2 *\tab what is +? When is it addition, and when is it concatenation? How do each behave?}
\par 
\par {\ltrch\loch\f2 *\tab what is %?}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li840\ri0\fi-420\ltrch\loch\f2 
\par {\ltrch\loch\f2 *\tab (consider the issues involved in HW #1's Exercise 1a)}
\par 
\par {\ltrch\loch\f2 *\tab You are expected to be comfortable with, and follow, the accepted case conventions for Java (named constants in all-caps, class names start with a capital letter, method names do not, etc.)}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-420\ltrch\loch\f2 
\par {\ltrch\loch\f2 *\tab Java functions:}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li870\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab (as in HW #1)}
\par {\ltrch\loch\f2 *\tab how do you write a function in Java?}
\par 
\par {\ltrch\loch\f2 *\tab can you use the design recipe to complete a Java function, given a description of the function desired?}
\par 
\par {\ltrch\loch\f2 *\tab if asked, you should be able to work through this process to result in a Purpose statement, the function itself, and a test function that incorporates the examples that you developed before writing the body of the function.}
\par 
\par {\ltrch\loch\f2 *\tab (the test function should appropriately use JPT functions testHeader(), expected(), and actual())}
\par 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab Testing}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li840\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab when should you come up with specific examples for a function or method? (BEFORE you write it!)}
\par 
\par {\ltrch\loch\f2 *\tab how many examples/tests are needed?}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li1275\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab (remember that you want an example/test for each major "case" within the function/method scenario ---)}
\par 
\par {\ltrch\loch\f2 *\tab (---and when branching is involved, each branch is a separate case, but it is important to also test the {\b boundaries} between cases).}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-420\ltrch\loch\f2 
\par {\ltrch\loch\f2 *\tab Java classes}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li840\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab what does a class in Java represent? What is a Java object? What does it include?}
\par 
\par {\ltrch\loch\f2 *\tab what "pieces" should be included within a Java class?}
\par 
\par {\ltrch\loch\f2 *\tab how do you declare ...}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li1275\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab data fields within a class?}
\par {\ltrch\loch\f2 *\tab constructors?}
\par {\ltrch\loch\f2 *\tab accessor methods?}
\par {\ltrch\loch\f2 *\tab modifier methods?}
\par {\ltrch\loch\f2 *\tab overridden methods (methods that you'd like to override methods provided by a superclass)}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li1710\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab what's an example of a method that should always be overridden for any class involving data?}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li1275\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab other methods?}
\par 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li855\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab How do you declare a constant value within a class? Which keywords should you use? How many "copies" of a thing declared to be {\b static} are there?}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li1275\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab for that matter --- what is considered to be part of each {\b object}, each constructed instance of a class?}
\par 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li870\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab Given sufficient information --- either in prose or in the form of a UML --- you should be able to write a Java class corresponding to that information.}
\par 
\par {\ltrch\loch\f2 *\tab You should be able to write a corresponding test class for that new class, as well.}
\par 
\par {\ltrch\loch\f2 *\tab You should be able to handle classes with data fields whose type is another Java class that you have written or that you are provided... how is this depicted in UML?}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li840\ri0\fi-420\ltrch\loch\f2 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab Java superclasses and subclasses}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li840\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab Given a Java class hierarchy --- what is the definition of a {\b type} within that hierarchy?}
\par 
\par {\ltrch\loch\f2 *\tab Of what superclass are all defined classes in Java a subclass?}
\par 
\par {\ltrch\loch\f2 *\tab How do you indicate, in Java, that one class is a subclass of another?}
\par 
\par {\ltrch\loch\f2 *\tab What is the difference between an abstract class and a "concrete" class?}
\par 
\par {\ltrch\loch\f2 *\tab What is the difference between an abstract method and a regular method?}
\par 
\par {\ltrch\loch\f2 *\tab Given prose or a UML for a class hierarchy --- you should be able to write the corresponding classes for that hierarchy.}
\par 
\par {\ltrch\loch\f2 *\tab Given prose or code, you should be able to draw the UML for either a class or for a hierarchy of classes. (For this test and for now, we'll assume that ALL methods and data fields will be included in the UML, including accessors.)}
\par 
\par {\ltrch\loch\f2 *\tab How can you tell, in such a description and/or UML, whether a supertype within that hierarchy ought to be abstract?}
\par 
\par {\ltrch\loch\f2 *\tab When you have a hierarchy exhibiting the {\b union pattern} discussed --- you should be able to write a corresponding test class for the abstract superclass and all of its subclasses (as in {\b APersonTest.java} in HW #3).}
\par 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab Design Recipe:}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li840\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab how does the design recipe differ for a class, and for a method within that class?}
\par 
\par {\ltrch\loch\f2 *\tab don't forget: the basic idea is that data analysis and design comes first, for either --- and that, once you are down to chunks such as methods, you should come up with specific examples *before* you actually write the method.}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-420\ltrch\loch\f2 
\par {\ltrch\loch\f2 *\tab Odds and Ends, such as:}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li840\ri0\fi-420\ltrch\loch\f2 {\ltrch\loch\f2 *\tab ...how do you see if two String objects are equivalent?}
\par 
\par {\ltrch\loch\f2 *\tab ...in a supertype, how can you tell (in a method) if something is an instance of a particular subclass? (instanceof)}
\par 
\par 
\par 
\par 
\par }