<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Lucky Cat Tutoring Services</title>
	<atom:link href="http://luckycattutoring.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://luckycattutoring.wordpress.com</link>
	<description>Tutorials, Tutoring, Photoshop and Java</description>
	<lastBuildDate>Tue, 03 Nov 2009 16:44:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='luckycattutoring.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Lucky Cat Tutoring Services</title>
		<link>http://luckycattutoring.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://luckycattutoring.wordpress.com/osd.xml" title="Lucky Cat Tutoring Services" />
	<atom:link rel='hub' href='http://luckycattutoring.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Arrays 01</title>
		<link>http://luckycattutoring.wordpress.com/2009/11/03/arrays-01/</link>
		<comments>http://luckycattutoring.wordpress.com/2009/11/03/arrays-01/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 16:44:38 +0000</pubDate>
		<dc:creator>luckycattutoring</dc:creator>
				<category><![CDATA[Class Notes]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[CCAC]]></category>
		<category><![CDATA[CIT111]]></category>
		<category><![CDATA[java arrays]]></category>
		<category><![CDATA[loops]]></category>
		<category><![CDATA[methods]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://luckycattutoring.wordpress.com/?p=61</guid>
		<description><![CDATA[ARRAYS ARE: &#8211;Primitive variables are designs to hold only one value at a time &#8211;allows to create collection of like indexed values &#8211;can store any type of data but only one type at a time &#8211;List of data elements Creating Arrays &#8211;An array is an object so it needs to be referenced. Then create array [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=61&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>ARRAYS ARE:</strong><br />
&#8211;Primitive variables are designs to hold only one value at a time<br />
&#8211;allows to create collection of like indexed values<br />
&#8211;can store any type of data but only one type at a time<br />
<i>&#8211;List of data elements</I></p>
<p>Creating Arrays<br />
&#8211;An array is an object so it needs to be referenced. Then create array and assign address </p>
<blockquote><p>
int[]nameofarray=new int [INTEGER VALUE]
</p></blockquote>
<p>Integer value can be a variable, a constant etc but always must be INT.<br />
&#8211;Whatever data type is stored in the array determines how it is initialized. If it&#8217;s created as an INT all values start at 0.<br />
&#8211;may be of any type (floats, car, long, double etc)</p>
<p>ARRAY SIZE: must be a non negative number. It may be a literal, a constant, or avariable<br />
ex: final int ARRAY_SIZE=6<br />
int[] numbers=new int[ARRAY_SIZE]<br />
<em>&#8211;Once created the size is fixed and cannot change!!</em></p>
<p>USING INDEX VALUES<br />
&#8211;The first element is ALWAYS <strong>INDEX 0</strong>. The last element in the array is always the <strong>size or length -1</strong></p>
<blockquote><p>
In an array with 6 indexes. The first one is index0, the last one is index5
</p></blockquote>
<p><strong>Calling an index:</strong><br />
<em>arrayname[indexnumber]= new value     //assigning variables to be held in the index<br />
arrayname[0]=17</p>
<p>An array is accessed by:<br />
&#8211;The reference name<br />
&#8211;the subscript [] which declares what to access</p>
<p>Can be treated like any other variable of the same type.<br />
<span id="more-61"></span><br />
<strong>Bounds Checking</strong><br />
Array indexes start at 0 and continue to length<br />
ex: int values[] = new int[10] //array would have index 0-9</p>
<p>In FOR loops it is typical to use i,j, and k, as counting variables</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/luckycattutoring.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/luckycattutoring.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/luckycattutoring.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/luckycattutoring.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/luckycattutoring.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/luckycattutoring.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/luckycattutoring.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/luckycattutoring.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/luckycattutoring.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/luckycattutoring.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/luckycattutoring.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/luckycattutoring.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/luckycattutoring.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/luckycattutoring.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=61&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://luckycattutoring.wordpress.com/2009/11/03/arrays-01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ad49a72183fb05a7bb23b2adee6bb98?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">luckycattutoring</media:title>
		</media:content>
	</item>
		<item>
		<title>Return Method Example</title>
		<link>http://luckycattutoring.wordpress.com/2009/10/20/return-method-example/</link>
		<comments>http://luckycattutoring.wordpress.com/2009/10/20/return-method-example/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 16:08:29 +0000</pubDate>
		<dc:creator>luckycattutoring</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CCAC]]></category>
		<category><![CDATA[CIT111]]></category>
		<category><![CDATA[Class Notes]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[loops]]></category>
		<category><![CDATA[methods]]></category>
		<category><![CDATA[newbie java]]></category>

		<guid isPermaLink="false">http://luckycattutoring.wordpress.com/?p=58</guid>
		<description><![CDATA[Here&#8217;s an example of a method that returns the smallest number out of a set of three entered by the user: /* *making methods return *This program demonstrates the use of value return methods *get three integers and return the smallest */ import java.util.Scanner; // Needed for the Scanner class public class methodReturn2 { public [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=58&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an example of a method that returns the smallest number out of a set of three entered by the user:<br />
<span id="more-58"></span></p>
<blockquote><p>
/* </p>
<p> *making methods return<br />
 *This program demonstrates the use of value return methods<br />
 *get three integers and return the smallest<br />
 */<br />
 import java.util.Scanner; // Needed for the Scanner class</p>
<p> public class methodReturn2<br />
 {</p>
<p> 	public static int findSmall(int n1, int n2,int n3)//this method returns an int and picks the bigger one</p>
<p> 	{<br />
 		if(n1 &lt; n2 &amp;&amp; n1 &lt; n3)<br />
 		{<br />
 			return n1;<br />
 		}<br />
		else if(n2 &lt; n1 &amp;&amp; n2&lt; n3)<br />
		{<br />
			return n2;<br />
		}<br />
		else if(n3 &lt; n1 &amp;&amp; n3&#8243;);<br />
 	   	int number1=sc.nextInt();<br />
 	   	System.out.println(&#8220;Please enter the second integer&#8211;&gt;&#8221;);<br />
 	   	int number2=sc.nextInt();<br />
 	   	System.out.println(&#8220;Please enter the third integer&#8211;&gt;&#8221;);<br />
 	   	int number3=sc.nextInt();</p>
<p> 	 	System.out.println(&#8220;\nThe smallest of the values is &#8221; +findSmall(number1,number2,number3));<br />
 	 	//invoke method and give it ints to work with</p>
<p> 	}</p>
<p> }
</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/luckycattutoring.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/luckycattutoring.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/luckycattutoring.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/luckycattutoring.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/luckycattutoring.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/luckycattutoring.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/luckycattutoring.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/luckycattutoring.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/luckycattutoring.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/luckycattutoring.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/luckycattutoring.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/luckycattutoring.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/luckycattutoring.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/luckycattutoring.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=58&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://luckycattutoring.wordpress.com/2009/10/20/return-method-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ad49a72183fb05a7bb23b2adee6bb98?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">luckycattutoring</media:title>
		</media:content>
	</item>
		<item>
		<title></title>
		<link>http://luckycattutoring.wordpress.com/2009/10/13/56/</link>
		<comments>http://luckycattutoring.wordpress.com/2009/10/13/56/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 16:07:11 +0000</pubDate>
		<dc:creator>luckycattutoring</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CIT111]]></category>
		<category><![CDATA[Class Notes]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[methods]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://luckycattutoring.wordpress.com/?p=56</guid>
		<description><![CDATA[Methods:Stand alone units, or blocks of code that do a specific task.  Help organize code and make things more efficient. <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=56&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Methods:</strong>Stand alone units, or blocks of code that do a specific task. <Br><br />
&#8211;EXAMPLE: public static void main(String []args) &lt;&#8212;a main method<br />
&#8211;the &quot;public&quot; means it&#039;s public, &quot;void&quot; returns nothing, &quot;(String[]args)&quot; returns the string<br />
&#8211;<br />
<strong>Step-line Refinement: </strong>Creating routines and methods to break the code down into more manageable and efficent parts. </p>
<p>MAKING A METHOD<br />
1) Call the method inside the main method: any method that is called inside the main must also be <strong>STATIC!</strong><Br></p>
<blockquote><p>Example: public static void printStar()<br />
{<br />
}<br />
KEY POINT:<strong>METHODS CAN NEVER BE INSIDE ANOTHER METHOD! It&#8217;s inside the class, but outside any other method!</strong>
</p></blockquote>
<p>2) next put the required method code inside the {} to make the method, making sure that the block of code stands alone.</p>
<p>3)INVOKING THE METHOD: put the method in the code by putting the method name and ()</p>
<p><span id="more-56"></span></p>
<blockquote><p>
printStar();
</p></blockquote>
<p>Example of full mini method program</p>
<blockquote><p>
/* This is a program that displays a star<br />
 *<br />
 *<br />
 *<br />
 *making methods<br />
 */</p>
<p> public class StarProgram<br />
 {<br />
 	public static void printStar()<br />
 	{<br />
 		System.out.println(&#8221;    *    &#8220;);<br />
 	   	System.out.println(&#8221;   ***   &#8220;);<br />
 	   	System.out.println(&#8221;  *****  &#8220;);<br />
 	   	System.out.println(&#8221; ******* &#8220;);<br />
 	   	System.out.println(&#8221;  *****  &#8220;);<br />
 	   	System.out.println(&#8221;   ***   &#8220;);<br />
 	   	System.out.println(&#8221;    *    &#8220;);<br />
 	}<br />
 	public static void main(String [] args)<br />
 	{<br />
 	    //System.out.println(&#8220;This is my star&#8221; + &#8220;\nI call this star George\n&#8221;);<br />
 	   	System.out.println(&#8220;This is my star\nI call this star Fred\n&#8221;);</p>
<p> 	   	printStar();//calling the method<br />
 	}</p>
<p> }</p>
<p>The output looks like:</p>
<p>This is my star<br />
I call this star Fred</p>
<p>    *<br />
   ***<br />
  *****<br />
 *******<br />
  *****<br />
   ***<br />
    *    </p>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/luckycattutoring.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/luckycattutoring.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/luckycattutoring.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/luckycattutoring.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/luckycattutoring.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/luckycattutoring.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/luckycattutoring.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/luckycattutoring.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/luckycattutoring.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/luckycattutoring.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/luckycattutoring.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/luckycattutoring.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/luckycattutoring.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/luckycattutoring.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=56&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://luckycattutoring.wordpress.com/2009/10/13/56/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ad49a72183fb05a7bb23b2adee6bb98?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">luckycattutoring</media:title>
		</media:content>
	</item>
		<item>
		<title>Free Programming Reference Cards</title>
		<link>http://luckycattutoring.wordpress.com/2009/10/08/free-programming-reference-cards/</link>
		<comments>http://luckycattutoring.wordpress.com/2009/10/08/free-programming-reference-cards/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 15:50:40 +0000</pubDate>
		<dc:creator>luckycattutoring</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://luckycattutoring.wordpress.com/?p=54</guid>
		<description><![CDATA[Programmer Ref Cards from Dzone. Free Sparknotes style cheat sheet references for programmers and students. Registration to the site is free too!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=54&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://refcardz.dzone.com/?oid=ban00027-0">Programmer Ref Cards from Dzone</a>. Free Sparknotes style cheat sheet references for programmers and students. Registration to the site is free too!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/luckycattutoring.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/luckycattutoring.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/luckycattutoring.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/luckycattutoring.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/luckycattutoring.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/luckycattutoring.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/luckycattutoring.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/luckycattutoring.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/luckycattutoring.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/luckycattutoring.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/luckycattutoring.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/luckycattutoring.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/luckycattutoring.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/luckycattutoring.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=54&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://luckycattutoring.wordpress.com/2009/10/08/free-programming-reference-cards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ad49a72183fb05a7bb23b2adee6bb98?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">luckycattutoring</media:title>
		</media:content>
	</item>
		<item>
		<title>Making a Finch Count With &#8216;For&#8217; Loop</title>
		<link>http://luckycattutoring.wordpress.com/2009/10/06/making-a-finch-count/</link>
		<comments>http://luckycattutoring.wordpress.com/2009/10/06/making-a-finch-count/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 15:01:03 +0000</pubDate>
		<dc:creator>luckycattutoring</dc:creator>
				<category><![CDATA[Finches]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[CIT111]]></category>
		<category><![CDATA[Class Notes]]></category>
		<category><![CDATA[CMU]]></category>
		<category><![CDATA[Finch]]></category>
		<category><![CDATA[loops]]></category>

		<guid isPermaLink="false">http://luckycattutoring.wordpress.com/?p=45</guid>
		<description><![CDATA[Here&#8217;s some code to make the CMU Finch count down from 10 and sing. /**  * Created by:  * Date:  * make baby Finch count and change nose color to a random tint with each number  */ import finch.*; import javax.swing.JOptionPane; import java.util.Random; public class finchCount {    public static void main(final String[] args)    [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=45&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s some code to make the CMU Finch count down from 10 and sing.</p>
<blockquote><p>/**<br />
 * Created by:<br />
 * Date:<br />
 * make baby Finch count and change nose color to a random tint with each number<br />
 */</p>
<p>import finch.*;<br />
import javax.swing.JOptionPane;<br />
import java.util.Random;</p>
<p>public class finchCount<br />
{</p>
<p>   public static void main(final String[] args)<br />
   {<br />
   // Instantiating the Finch object<br />
      Finch baby = new Finch();<br />
      Random spin = new Random();<br />
      int count, redNum, greenNum, blueNum;<br />
   String input; //name for what you&#8217;re asking for<br />
  <br />
   <br />
  input = JOptionPane.showInputDialog(null, &#8220;What number do you want to count to?&#8221;);<br />
  count = Integer.parseInt(input);<br />
  <br />
  for(int i = 1; i &lt;= count; i++)//variable I; while I is lessthan/equal to COUNT, keep adding to I<br />
          //never a ; here<br />
  {<br />
   baby.saySomething(&#8220;&#8221;+ i);<br />
   baby.sleep(1000);<br />
   //turn nose to random color<br />
   redNum= spin.nextInt(256);//random num between 0 and 255<br />
   greenNum= spin.nextInt(256);//random num between 0 and 255<br />
   blueNum= spin.nextInt(256);//random num between 0 and 255<br />
   baby.setLED(redNum,greenNum,blueNum);<br />
   baby.sleep(1000);<br />
   System.out.println(&#8220;number &#8221; +i);<br />
   <br />
   <br />
  }<br />
      // Always end your program with finch.quit()<br />
      baby.quit();<br />
      System.exit(0);<br />
    }<br />
}</p>
<p>How about a fun nose  color change too? <span id="more-45"></span></p></blockquote>
<p>This next program has the finch count to ten, say the number, and have it&#8217;s nose change color in relation to its counting.  The LED will change color in a gradient from dark to brighter blue</p>
<blockquote><p>/**<br />
 * Created by:<br />
 * Date: 0910.06<br />
 * in class looping problem with a finch<br />
 */</p>
<p>import finch.*;</p>
<p>public class finchLoop01<br />
{</p>
<p>   public static void main(final String[] args)<br />
   {<br />
   // Instantiating the Finch object<br />
      Finch baby = new Finch();</p>
<p> for(int i =1; i&lt;= 10; i++) //while I is lessthan or equal to 10&#8230;to this, each round add 1<br />
 {<br />
  baby.saySomething(&#8220;The number is &#8221; +i);<br />
  System.out.println(&#8220;The number is &#8220;+i);<br />
  baby.setLED(i*5,i*10,i*20); //makes a light gradient<br />
  baby.sleep(1500);<br />
  <br />
 }<br />
      // Always end your program with finch.quit()<br />
      baby.quit();<br />
      System.exit(0);<br />
    }<br />
}</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/luckycattutoring.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/luckycattutoring.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/luckycattutoring.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/luckycattutoring.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/luckycattutoring.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/luckycattutoring.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/luckycattutoring.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/luckycattutoring.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/luckycattutoring.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/luckycattutoring.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/luckycattutoring.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/luckycattutoring.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/luckycattutoring.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/luckycattutoring.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=45&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://luckycattutoring.wordpress.com/2009/10/06/making-a-finch-count/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ad49a72183fb05a7bb23b2adee6bb98?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">luckycattutoring</media:title>
		</media:content>
	</item>
		<item>
		<title>CIT 111: While Loops</title>
		<link>http://luckycattutoring.wordpress.com/2009/09/17/cit-111-while-loops/</link>
		<comments>http://luckycattutoring.wordpress.com/2009/09/17/cit-111-while-loops/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 15:59:03 +0000</pubDate>
		<dc:creator>luckycattutoring</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CIT111]]></category>
		<category><![CDATA[Class Notes]]></category>
		<category><![CDATA[infinite loop]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[loops]]></category>

		<guid isPermaLink="false">http://luckycattutoring.wordpress.com/?p=41</guid>
		<description><![CDATA[While loops mean &#8220;while this statement is true, do this. When it&#8217;s false do something else. A loop is a part of a program that repeats until a certain need is met Every &#8220;WHILE&#8221; loop that you write has certain parts. If you forget these, you can end up with an infinite loop and you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=41&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>While loops mean &#8220;while this statement is true, do this. When it&#8217;s false do something else. A loop is a part of a program that repeats until a certain need is met</strong><br />
Every &#8220;WHILE&#8221; loop that you write has certain parts. If you forget these, you can end up with an infinite loop and you don&#8217;t want this. Infinite loop goes on forever (the dreaded hourglass in windows, the spinning pinwheel of death in mac&#8230;) and THIS IS BAD! Don&#8217;t be like Microsoft, loop well.<Br></p>
<p><em><strong><strong>With all loops:</strong><br />
Initialize<br />
Test<br />
Update</strong></em><br />
Make sure not to close your loop prematurely with a &#8220;;&#8221;<Br><br />
Ex:</p>
<blockquote><p>while (number  MAX_INT) <strong>// NO &#8220;;&#8221; IN A WHILE LOOP; &amp;&amp; cannot work for this, instead use OR which is ||</strong>      {<br />
        JOptionPane.showMessageDialog(null,&#8221;You must not be able to read. Try again, Ceiling Cat is watching! &#8220;);<br />
       	inData = JOptionPane.showInputDialog(&#8221; Please enter a number from 1 to 10&#8243;);<br />
        number =Integer.parseInt(inData);//make string a number datatype<br />
      }
</p></blockquote>
<p>Lets look at this little program:</p>
<blockquote><p>/**<br />
   This program demonstrates the while loop.<br />
*/</p>
<p>public class WhileLoop<br />
<em>//while is a KEY WORD and has special meaning. &#8220;While&#8221; is followed by a boolean expression inside a {}<br />
//while &#8220;this bit of bode is doing its thing and this condition is true, then do this command. when it&#8217;s FALSE stop doing.</em><br />
{<br />
   public static void main(String [] args)<br />
   {<br />
      int number = 1; //this INITIALIZES</p>
<p>      while (number &lt;= 5) //this TESTS<br />
      {<br />
         System.out.println(&quot;Hello&quot;);<br />
         number++;//this UPDATES the loop<br />
      }</p>
<p>      System.out.println(&quot;That&#039;s all!&quot;);<br />
   }<br />
}
</p></blockquote>
<p>Keep in mind that {}s are your friends. They link bits of code together like putting beads in different boxes in a kit. Lets do a tracethrough of this little program:<span id="more-41"></span></p>
<p>Number is made to be a value of one.<br />
{Test: is NUMBER less than or = to 5?<br />
yes it is&#8230;lets do our loop. Say &#8220;hello!&#8221;<br />
Add 1 to Number. Number is now 2. Lets go again&#8230;.}<br /><Br></p>
<p>Number is made to be a value of 2.<br />
{Test: is NUMBER less than or = to 5?<br />
Yes it is lets do our loop. Say &#8220;hello!&#8221;<br />
Add 1 to Number. Number is now 2. Lets go again&#8230;.}</p>
<p>Number is made to be a value of one.<br />
{Test: is NUMBER less than or = to 5?<br />
yes it is&#8230;lets do our loop. Say &#8220;hello!&#8221;<br />
Add 1 to Number. Number is now 3. Lets go again&#8230;.}<br /><Br></p>
<p>Number is made to be a value of 3.<br />
{Test: is NUMBER less than or = to 5?<br />
yes it is, lets do our loop. Say &#8220;hello!&#8221;<br />
Add 1 to Number. Number is now 4. Lets go again&#8230;.}</p>
<p>Number is made to be a value of 4.<br />
{Test: is NUMBER less than or = to 5?<br />
yes it is, lets do our loop. Say &#8220;hello!&#8221;<br />
Add 1 to Number. Number is now 5. Lets go again&#8230;.}</p>
<p>Number is made to be a value of 5.<br />
{Test: is NUMBER less than or = to 5?<br />
yes it is, lets do our loop. Say &#8220;hello!&#8221;<br />
Add 1 to Number. Number is now 6. Lets go again&#8230;.}</p>
<p>Number is made to be a value of 6.<br />
{Test: is NUMBER less than or = to 5?<br />
NO! TIme to get out of the loop<br />
Print &#8220;that is all&#8221; and it&#8217;s done }</p>
<p>What if a part is missing. Take out the &#8220;UPDATE&#8221; method and let it run&#8230;you&#8217;re going to be there for a while. You&#8217;ve made yourself a crash! </p>
<p><strong>PRACTICAL APPLICATIONS OF LOOPS</strong><br />
1) Prompting the user to enter in a value until it&#8217;s correct. Insure some data integrity; make sure the data is in range before it does anything with it<br />
2)Use as a log<br />
And there are many other uses as well</p>
<p>PROGRAMING STYLE AND THE WHILE LOOP<br />
Watch &#8220;;&#8221; in syntax. That means &#8220;stop looping and just do the following code&#8221;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/luckycattutoring.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/luckycattutoring.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/luckycattutoring.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/luckycattutoring.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/luckycattutoring.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/luckycattutoring.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/luckycattutoring.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/luckycattutoring.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/luckycattutoring.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/luckycattutoring.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/luckycattutoring.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/luckycattutoring.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/luckycattutoring.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/luckycattutoring.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=41&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://luckycattutoring.wordpress.com/2009/09/17/cit-111-while-loops/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ad49a72183fb05a7bb23b2adee6bb98?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">luckycattutoring</media:title>
		</media:content>
	</item>
		<item>
		<title>CS111 Decision Structures part 1</title>
		<link>http://luckycattutoring.wordpress.com/2009/09/17/cs111-decision-structures-part-1/</link>
		<comments>http://luckycattutoring.wordpress.com/2009/09/17/cs111-decision-structures-part-1/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 15:20:00 +0000</pubDate>
		<dc:creator>luckycattutoring</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://luckycattutoring.wordpress.com/?p=37</guid>
		<description><![CDATA[Even the most basic programs have to make choices. We do this with &#8220;if-then&#8221;, &#8220;if-else&#8221;, &#8220;if-else-if&#8221;, &#8220;Switch&#8221; and other decision structures. Switch Control Structure: acts like an if else statment; lets user pick an option and &#8216;switches&#8217; Start with SWITCH which is a keyword and tells the program to evaluate that variable (in example is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=37&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Even the most basic programs have to make choices. We do this with &#8220;if-then&#8221;, &#8220;if-else&#8221;, &#8220;if-else-if&#8221;, &#8220;Switch&#8221; and other decision structures. </p>
<p><em>Switch Control Structure: acts like an if else statment; lets user pick an option and &#8216;switches&#8217;<br /></em></p>
<p>Start with SWITCH which is a keyword and tells the program to evaluate that variable (in example is &#8220;number&#8221;). Switch can only compare INT or CHAR variables.  BREAK after each case pops out of the control structure. </p>
<blockquote><p>
import java.util.Scanner;    // Needed for Scanner class</p>
<p>/**<br />
   This program demonstrates the switch statement.<br />
*/</p>
<p>public class SwitchDemo<br />
{<br />
   public static void main(String[] args)<br />
   {<br />
      int number;       // A number entered by the user</p>
<p>      // Create a Scanner object for keyboard input.<br />
      Scanner keyboard = new Scanner(System.in);</p>
<p>      // Get one of the numbers 1, 2, or 3 from the user.<br />
      System.out.print(&#8220;Enter 1, 2, or 3: &#8220;);<br />
      number = keyboard.nextInt();</p>
<p>      // Determine the number entered.<br />
      switch (number)<br />
      {<br />
         case 1:<br />
            System.out.println(&#8220;You entered 1.&#8221;);<br />
            break;<br />
         case 2:<br />
            System.out.println(&#8220;You entered 2.&#8221;);<br />
            break;<br />
         case 3:<br />
            System.out.println(&#8220;You entered 3.&#8221;);<br />
            break;<br />
         default:<br />
            System.out.println(&#8220;That&#8217;s not 1, 2, or 3!&#8221;);<br />
      }<br />
   }<br />
}
</p></blockquote>
<p>Switch control structures are easier to read than other forms</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/luckycattutoring.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/luckycattutoring.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/luckycattutoring.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/luckycattutoring.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/luckycattutoring.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/luckycattutoring.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/luckycattutoring.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/luckycattutoring.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/luckycattutoring.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/luckycattutoring.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/luckycattutoring.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/luckycattutoring.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/luckycattutoring.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/luckycattutoring.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=37&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://luckycattutoring.wordpress.com/2009/09/17/cs111-decision-structures-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ad49a72183fb05a7bb23b2adee6bb98?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">luckycattutoring</media:title>
		</media:content>
	</item>
		<item>
		<title>CIT111: Lets Add and Subtract</title>
		<link>http://luckycattutoring.wordpress.com/2009/09/17/cit111-lets-add-and-subtract/</link>
		<comments>http://luckycattutoring.wordpress.com/2009/09/17/cit111-lets-add-and-subtract/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 15:17:17 +0000</pubDate>
		<dc:creator>luckycattutoring</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CIT111]]></category>
		<category><![CDATA[Class Notes]]></category>
		<category><![CDATA[incrementing]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[newbie java]]></category>

		<guid isPermaLink="false">http://luckycattutoring.wordpress.com/?p=38</guid>
		<description><![CDATA[With incrementing and decrementing, things can be in many different orders. You can prefix, or postfix and write it in different ways. Example: &#8220;++number&#8221; is the same as &#8220;number++&#8221; or &#8220;number +=1&#8243;. What happens with prefixing: Say you have a number 4 and ++number. When it runs the program it will starting 5, not 4. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=38&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>With incrementing and decrementing, things can be in many different orders. You can prefix, or postfix and write it in different ways. </p>
<p>Example: &#8220;++number&#8221; is the same as &#8220;number++&#8221; or &#8220;number +=1&#8243;. </p>
<p>What happens with prefixing:<br />
Say you have a number 4 and ++number. When it runs the program it will starting 5, not 4. If you put it after, then it will start with 4. Here&#8217;s a small example program.</p>
<blockquote><p>
/**<br />
   This program demonstrates the ++ and &#8212; operators.<br />
*/</p>
<p>public class IncrementDecrement<br />
{<br />
   public static void main(String[] args)<br />
   {<br />
      int number = 4;  // number starts out with 4</p>
<p>      // Display the value in number.<br />
      System.out.println(&#8220;number is &#8221; + number);<br />
      System.out.println(&#8220;I will increment number.&#8221;);</p>
<p>      // Increment number.<br />
      number++; //number=number + 1; number += 1 Can put ++ or &#8212; infront of variable</p>
<p>      // Display the value in number again.<br />
      System.out.println(&#8220;Now, number is &#8221; + number);<br />
      System.out.println(&#8220;I will decrement number.&#8221;);</p>
<p>      // Decrement number.<br />
      number&#8211;; //number=number-1; number -=1</p>
<p>      // Display the value in number once more.<br />
      System.out.println(&#8220;Now, number is &#8221; + number);<br />
   }<br />
}
</p></blockquote>
<p>The result of this program shows up as:<br />
<I>number is 4<br />
I will increment number.<br />
Now, number is 5<br />
I will decrement number.<br />
Now, number is 4</p>
<p>Process completed.</I></p>
<p>If PREfixed, the program spits out<br />
<I>number is 5<br />
I will increment number.<br />
Now, number is 6<br />
I will decrement number.<br />
Now, number is 5</p>
<p>Process completed.</I></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/luckycattutoring.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/luckycattutoring.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/luckycattutoring.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/luckycattutoring.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/luckycattutoring.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/luckycattutoring.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/luckycattutoring.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/luckycattutoring.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/luckycattutoring.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/luckycattutoring.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/luckycattutoring.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/luckycattutoring.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/luckycattutoring.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/luckycattutoring.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=38&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://luckycattutoring.wordpress.com/2009/09/17/cit111-lets-add-and-subtract/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ad49a72183fb05a7bb23b2adee6bb98?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">luckycattutoring</media:title>
		</media:content>
	</item>
		<item>
		<title>CIT 111: String Classes and Methods</title>
		<link>http://luckycattutoring.wordpress.com/2009/09/01/cit-111-string-classes-and-methods/</link>
		<comments>http://luckycattutoring.wordpress.com/2009/09/01/cit-111-string-classes-and-methods/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 16:41:54 +0000</pubDate>
		<dc:creator>luckycattutoring</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://luckycattutoring.wordpress.com/?p=35</guid>
		<description><![CDATA[String classes and Methods Each string class has methods to manipulate them. Any input from GUI windows come in as a string datatype and must be changed into the correct classes. String classes are constant and their value can&#8217;t be changed after they are created. A string class is a complex data type, sort of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=35&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>String classes and Methods</strong><br />
Each string class has methods to manipulate them.  Any input from GUI windows come in as a string datatype and must be changed into the correct classes. String classes are constant and their value can&#8217;t be changed after they are created.<br />
A string class is a complex data type, sort of like an &#8216;array&#8217; but it&#8217;s more than just that. For example, in strings, the characters are indexed by number. Index = &#8220;length -1&#8243;<br />
A list of every string method can be found under strings at <a href="http://java.sun.com/javase/6/docs/api">Java 6 API Docs</a>. This is handy if you don&#8217;t know what the method is or just want to know more. </p>
<blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/luckycattutoring.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/luckycattutoring.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/luckycattutoring.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/luckycattutoring.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/luckycattutoring.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/luckycattutoring.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/luckycattutoring.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/luckycattutoring.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/luckycattutoring.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/luckycattutoring.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/luckycattutoring.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/luckycattutoring.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/luckycattutoring.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/luckycattutoring.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=35&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://luckycattutoring.wordpress.com/2009/09/01/cit-111-string-classes-and-methods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ad49a72183fb05a7bb23b2adee6bb98?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">luckycattutoring</media:title>
		</media:content>
	</item>
		<item>
		<title>CIT 111: Booleans &amp; Other Primitive Data Types</title>
		<link>http://luckycattutoring.wordpress.com/2009/09/01/cit-111-booleans-other-primitive-data-types/</link>
		<comments>http://luckycattutoring.wordpress.com/2009/09/01/cit-111-booleans-other-primitive-data-types/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 15:31:13 +0000</pubDate>
		<dc:creator>luckycattutoring</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CCAC]]></category>
		<category><![CDATA[CIT111]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://luckycattutoring.wordpress.com/?p=30</guid>
		<description><![CDATA[Booleans: Can hold true or false, can be assigned any way that we want them, as long as the expression evaluates to &#8220;true or false&#8221;. Example: // A program for demonstrating boolean variables public class TrueFalse { public static void main(String[] args) { boolean bool; int a=18, b=12; bool = true; System.out.println(bool); bool = false; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=30&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Booleans: </strong>Can hold true or false, can be assigned any way that we want them, as long as the expression evaluates to &#8220;true or false&#8221;. </p>
<p>Example:</p>
<blockquote><p>// A program for demonstrating boolean variables</p>
<p>public class TrueFalse<br />
{<br />
   public static void main(String[] args)<br />
   {<br />
      boolean bool;<br />
		int a=18, b=12;<br />
      bool = true;<br />
      System.out.println(bool);<br />
      bool = false;<br />
      System.out.println(bool);<br />
      bool = a &gt; b;<br />
      	if (bool)<br />
      	{System.out.println(&#8220;&#8216;a&#8217; is larger than &#8216;b&#8217;&#8221;);<br />
      	}<br />
   }<br />
}<br />
<Br><Br><br />
<strong>Should come out to say:<Br><br />
true<br />
false<br />
&#8216;a&#8217; is larger than &#8216;b&#8217;</p>
<p>Process completed.</strong></p></blockquote>
<p>CHARS: are letter based only; can only hold a single character.<Br></p>
<blockquote><p>
// This program demonstrates the char data type.</p>
<p>public class Letters<br />
{<br />
   public static void main(String[] args)<br />
   {<br />
      char letter;</p>
<p>      letter = &#8216;A&#8217;;<br />
      System.out.println(letter);<br />
      letter = &#8216;B&#8217;;<br />
      System.out.println(letter);<br />
   }<br />
}
</p></blockquote>
<p>COMMON MISTAKES WITH CHARS:<br />
-Errors occur when more than one character is used. Char can only use ONE.<Br><br />
<strong>-Double quotes &#8220;&#8221; around the single character makes it the wrong data type. Anything with &#8220;&#8221; is a STRING not a CHAR!! Single quotes must always be used</strong><Br><br />
<strong><br />
Chars and Integer relationships:</strong> Letters can be assigned using numeric value for a letter in Java 6. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/luckycattutoring.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/luckycattutoring.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/luckycattutoring.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/luckycattutoring.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/luckycattutoring.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/luckycattutoring.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/luckycattutoring.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/luckycattutoring.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/luckycattutoring.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/luckycattutoring.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/luckycattutoring.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/luckycattutoring.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/luckycattutoring.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/luckycattutoring.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=luckycattutoring.wordpress.com&amp;blog=8141435&amp;post=30&amp;subd=luckycattutoring&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://luckycattutoring.wordpress.com/2009/09/01/cit-111-booleans-other-primitive-data-types/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ad49a72183fb05a7bb23b2adee6bb98?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">luckycattutoring</media:title>
		</media:content>
	</item>
	</channel>
</rss>
