<?xml version="1.0" encoding="utf-8" ?>
		<rss version="2.0">
			<channel>
				<title>Enzym RSS</title>
				<description>Free Wiki</description>
				<lastBuildDate>Wed, 30 Jul 2008 22:22:38 +0200</lastBuildDate>
				<link>http://cs235.myfreewiki.net</link>
		
	<item>
		<title>Home</title>
		<description>&lt;H1&gt;&lt;SPAN style="FONT-WEIGHT: bold; FONT-FAMILY: Arial"&gt;Welcome to the CS 235 Anti-Gotcha Page&lt;/SPAN&gt;&lt;/H1&gt;A word of help for all labs from the TAs:&lt;BR&gt;&lt;BR&gt;NEVER change the interfaces provided on the class webpage. It might run fine and compile on your machine, but it will not compile when you upload it to the passoff driver. Just a heads up so you don't have to do a lot of fixing after you thought that you had finished the lab.&lt;BR&gt;
&lt;H1 style="FONT-WEIGHT: normal"&gt;Lab 1&lt;/H1&gt;&lt;SPAN style="FONT-WEIGHT: bold; TEXT-DECORATION: underline"&gt;equals method&lt;/SPAN&gt;&lt;BR&gt;When you implement the "equals" method in your "Person" class, you might be tempted to do something like this:&lt;BR&gt;&lt;BR&gt;
&lt;DIV style="MARGIN-LEFT: 40px"&gt;public bool equals(Person other) {&lt;BR&gt;    ...&lt;BR&gt;}&lt;BR&gt;&lt;/DIV&gt;&lt;BR&gt;This will compile and run without any errors or indication that you have made a mistake, but you have not correctly overloaded the default implementation of equals. The default implementation will still be called, not yours. You must follow the interface definition precisely:&lt;BR&gt;&lt;BR&gt;
&lt;DIV style="MARGIN-LEFT: 40px"&gt;public bool equals(Object other) {&lt;BR&gt;    Person otherPerson = (Person)other;&lt;BR&gt;    ...&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;BR&gt;--------------------------------------------&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT: bold; TEXT-DECORATION: underline"&gt;null wholey null, and nothing but null&lt;/SPAN&gt;&lt;BR&gt;The TestDriver will pass empty strings into your objects and expect them to pass as valid new objects so don't do any empty string checking - only check for null references.&lt;BR&gt;&lt;BR&gt;----------------------------------------------&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT: bold"&gt;Working with the PersonIO&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;I decided to iterate through the array and learned about how to check if my variable was a student or a person etc... &lt;BR&gt;&lt;BR&gt;for (Person i:tempArr)&lt;BR&gt;        {&lt;BR&gt;            //check if person is a student&lt;BR&gt;            if(i instanceof Student)&lt;BR&gt;            {&lt;BR&gt;                StudentImpl tempStu;&lt;BR&gt;                tempStu = (StudentImpl) i;&lt;BR&gt;                tempStu.getMajor();&lt;BR&gt;&lt;BR&gt;I then used the tempStu object to run the calls I needed to build the information to export to the text file. Thought it might help... Good luck!&lt;BR&gt;&lt;BR&gt;-Ross 
&lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=Apple-style-span style="FONT-WEIGHT: bold"&gt;A note on the above technique:&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;Although it works, it is perhaps not ideal in terms of design or speed. We are dealing with related classes; the point of having them inherit from a common parent is so that you can treat them the same. Remember that each child of Person already defines its specific version of toString() implementation that will take care of the differences for you, without having to expend lines of code and processing power determining the class of each object. Let object-oriented programming do the work for ya!&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;-Jordan&lt;BR&gt;&lt;BR&gt;Yeah I slapped myself on the head, should have fixed the above "example" after I fixed my code eh?&lt;BR&gt;&lt;BR&gt;tempStr += i.toString(); //Rules!&lt;BR&gt;&lt;BR&gt;-Ross&lt;BR&gt;&lt;BR&gt;------------------------&lt;BR&gt;&lt;/DIV&gt;
&lt;H1 style="FONT-WEIGHT: normal"&gt;Lab 2&lt;/H1&gt;
&lt;DIV&gt;&lt;STRONG&gt;A note on Print debugging:&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;if you want to type less by making a method in your class to print, there are two things that can help you print what you want.&lt;/DIV&gt;
&lt;DIV&gt;If your method is:&lt;/DIV&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;DIV&gt;private static void myPrint (String output){&lt;/DIV&gt;
&lt;DIV&gt;        System.out.println (output);&lt;/DIV&gt;
&lt;DIV&gt;}&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;then to print objects you need to concatenate a string (even empty ones: "" ) to automatically call the toString method of that object. eg: myPrint ("MyObject is" + MyObject)  automatically calls MyObject's toString&lt;/DIV&gt;
&lt;DIV&gt; &lt;/DIV&gt;
&lt;DIV&gt;The other way to print objects other than strings is to make your method accept Objects instead:&lt;/DIV&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;DIV&gt;private static void myPrint (Object output){&lt;/DIV&gt;
&lt;DIV&gt;        System.out.println (output.toString()); // call te toString of whatever you passed&lt;/DIV&gt;
&lt;DIV&gt;}&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;then you can pass objects, integers, etc, without concatenating a string to them first.&lt;BR&gt;------------------------&lt;BR&gt;&lt;/DIV&gt;
&lt;H1 style="FONT-WEIGHT: normal"&gt;Lab 3&lt;/H1&gt;
&lt;DIV&gt;&lt;SPAN class=Apple-style-span style="FONT-WEIGHT: bold"&gt;Working With Recursive Algorithms&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;Like Bro. Gashler, I tend to be a text editor + terminal window kind of guy (btw, TextMate for OS X and its Windows equivalent, the "E Text Editor," are awesome). However, in certain situations, it can really help to have a debugger available that allows you to step through code as it is being executed, line by line, and the ability to track certain variables and see how they change. In my opinion, recursive algorithms like the sort used in Lab 3 are perfect examples of this. &lt;/DIV&gt;
&lt;DIV&gt;To start, grabbing a pen and paper and working out how an algorithm should work ended up really helping me in this project. I stepped through the process of spelling words from a board in my head, and this helped me realize what the algorithm needed to include.&lt;/DIV&gt;
&lt;DIV&gt;Once you have some code, using an IDE like NetBeans ( &lt;A href="http://www.netbeans.org/"&gt;http://www.netbeans.org/ )&lt;/A&gt; that includes the ability to "debug" code as it executes can help you to see what happens as your algorithm does its thing. Pay special attention to "special events" like:&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=Apple-tab-span style="WHITE-SPACE: pre"&gt;&lt;SPAN class=Apple-style-span style="FONT-STYLE: italic"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=Apple-style-span style="FONT-STYLE: italic"&gt;A prefix is not found in the dictionary&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=Apple-tab-span style="WHITE-SPACE: pre"&gt;&lt;SPAN class=Apple-style-span style="FONT-STYLE: italic"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=Apple-style-span style="FONT-STYLE: italic"&gt;A word is finally located&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=Apple-tab-span style="WHITE-SPACE: pre"&gt;&lt;SPAN class=Apple-style-span style="FONT-STYLE: italic"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=Apple-style-span style="FONT-STYLE: italic"&gt;A new starting point must be used&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;Personally, recursion can make my head hurt. Usually I can code by just letting my brain and the keyboard work together, but tools like debuggers are great when complexity increases. Use them!&lt;BR&gt;-Jordan&lt;BR&gt;&lt;BR&gt;
&lt;H3&gt;Using checkstyle even though you don't have to&lt;/H3&gt;
&lt;P&gt;Eclipse has an easy-to install plugin for checkstyle http://eclipse-cs.sourceforge.net/&lt;BR&gt;~Anonymous person that may or may not use an IDE&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT: bold"&gt;Just another thought &lt;BR&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT: bold"&gt;&lt;SPAN style="FONT-WEIGHT: bold"&gt;&lt;SPAN style="FONT-WEIGHT: bold"&gt;&lt;SPAN style="FONT-WEIGHT: bold"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Make sure that you check for duplicate words in your getAllValidWords method.&lt;/P&gt;
&lt;P&gt;~James&lt;BR&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;H1 style="FONT-WEIGHT: normal"&gt;Lab 4&lt;/H1&gt;
&lt;DIV&gt;When implementing the write function on your document class, dont worry about adding white space, all the necessary white space is already stored in text nodes throughout your tree, just iterate through it and print each nodes contents.&lt;BR&gt;----------------------&lt;BR&gt;&lt;/DIV&gt;
&lt;H1 style="FONT-WEIGHT: normal"&gt;Lab 5&lt;/H1&gt;
&lt;DIV&gt;Anyone else having trouble with the remove() method? I've been working on this lab for about 24 total hours (not consecutive!) now. Any help is appreciated. I keep getting stack overflows from my removeMin that my node classes use to tear off and return the first sorted item, as soon as that node is referenced again. Something's pointing to itself? maybe? Feel free to delete this message when something helpful has been written. It is 11:04 P.M., Mon July 28. Another late night with little progress. Can't blame the TAs for not wanting to stay up all night, too.&lt;BR&gt;
&lt;H1 style="FONT-WEIGHT: normal"&gt;Lab 6&lt;/H1&gt;The TestDriver provided requires that your BinaryTreeNode interface has the method getData (), but the PassOffDriver requries that the method be called getObject(). Just put BOTH methods in the BinaryTreeNodeInterface AND in your implementation. (I know your not 'supposed' to change the interface, but you got to do what you got to do).&lt;BR&gt;
&lt;H1 style="FONT-WEIGHT: normal"&gt;Lab 7&lt;/H1&gt;&lt;BR&gt;&lt;/DIV&gt;</description>
		<pubDate>Wed, 30 Jul 2008 22:22:38 +0200</pubDate>
		<link>http://cs235.myfreewiki.net/index.php?pageSelect=Home</link>
	</item>
	</channel>
</rss>