<?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/"
	>

<channel>
	<title>Garfield Computer Science &#187; 2009 AP CS A</title>
	<atom:link href="http://www.garfieldcs.com/category/courses/2009-apcs-a/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.garfieldcs.com</link>
	<description></description>
	<lastBuildDate>Mon, 06 Feb 2012 05:04:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Java v. Programming</title>
		<link>http://www.garfieldcs.com/2010/10/java-v-programming/</link>
		<comments>http://www.garfieldcs.com/2010/10/java-v-programming/#comments</comments>
		<pubDate>Tue, 12 Oct 2010 06:07:00 +0000</pubDate>
		<dc:creator>veldte</dc:creator>
				<category><![CDATA[2009 AP CS A]]></category>
		<category><![CDATA[2010 APCS]]></category>

		<guid isPermaLink="false">http://www.garfieldcs.com/?p=1896</guid>
		<description><![CDATA[Languages exist only to convey ideas in a streamlined manner. Therefore, the purpose in learning a language is not to understand that particular one, but rather, to be able to convey ideas in such a way or place as you would not otherwise be able to do. This extends to programming languages such as Java, Python, C, etc. The objective in taking AP CS is not to learn Java. That is merely something picked up accidentally along the way, perhaps in the quest to get a 5 on an AP ...]]></description>
			<content:encoded><![CDATA[<p>Languages exist only to convey ideas in a streamlined manner. Therefore, the purpose in learning a language is not to understand that particular one, but rather, to be able to convey ideas in such a way or place as you would not otherwise be able to do. This extends to programming languages such as Java, Python, C, etc. The objective in taking AP CS is not to learn Java. That is merely something picked up accidentally along the way, perhaps in the quest to get a 5 on an AP test. The purpose of AP CS is to be able to effectively understand a number of particularly strange and unwieldy concepts, many of which can be categorized under &#8220;programming.&#8221; It&#8217;s a different way of thinking.</p>
<p>On the AP CS A Exam, you will be given a number of functions with arcane names such as int x, int y, int z, and be asked how to attain a desired output with a few options (multiple choice). The test is designed to test a particular knowledge of Java syntax from memory in such a way that is taxing and confusing, supposedly to reinforce that the examined person does in fact understand Java. In reality, there will always be resources, texts, whatever is needed. Furthermore, in the real world, you can actually test something before you implement it. In 5, 10 years, it&#8217;s doubtful that the vast majority of you will remember much about Java, much like many of you already have forgotten about Freshman science class specifics. What you haven&#8217;t forgotten about honours biology are the ideas, the actually useful information.</p>
<p>Not to discourage doing lots of work to keep you busy, but most assignments will be&#8230; pointless (although I have heard that they help with GPAs). The examples alone typically suffice for imparting an idea, and complexity only detracts from the simplicity of a particular idea.</p>
<p>for instance take the method</p>
<p><code> </code></p>
<pre>public static void iLikeParameterFun(int parameter) {
	if (parameter / 101 == 1)
		System.out.println(" Oh hey, I figured out that 101/101 is equal to 1! zomgz!!!");
	else
		iLikeParameterFun(parameter + 1);
}</pre>
<p>I felt that was a pretty succinct example and it clearly shows what a parameter is and how parameters function. I might have forgotten a couple brackets here or there, but what does the phrase &#8220;close enough&#8221; mean without real-world application?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garfieldcs.com/2010/10/java-v-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great advice from &#8217;09/&#8217;10 AP CS!</title>
		<link>http://www.garfieldcs.com/2010/06/great-advice-from-0910-ap-cs/</link>
		<comments>http://www.garfieldcs.com/2010/06/great-advice-from-0910-ap-cs/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 00:31:57 +0000</pubDate>
		<dc:creator>Ms. Martin</dc:creator>
				<category><![CDATA[2009 AP CS A]]></category>

		<guid isPermaLink="false">http://www.garfieldcs.com/?p=1357</guid>
		<description><![CDATA[The Five Tenets of Programming
1. If you feel like you&#8217;re falling  behind, ask for help, if not from Ms. Martin, then from other  students.  You&#8217;ll save yourself hours of frustration.
2. Don&#8217;t be  afraid to try your own thing if you get the chance, even if you think  it&#8217;s beyond your level.  You&#8217;ll learn faster if you&#8217;re interested in the  project.
3. Temp variables are awesome.  So are ArrayLists.
4.  Don&#8217;t let the sometimes snooty programming club people argue with you  &#8212; by the end of ...]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>The Five Tenets of Programming</strong><br />
1. If you feel like you&#8217;re falling  behind, <span style="text-decoration: underline;">ask for help</span>, if not from Ms. Martin, then from other  students.  You&#8217;ll save yourself hours of frustration.<br />
2. Don&#8217;t be  afraid to try your own thing if you get the chance, even if you think  it&#8217;s beyond your level.  You&#8217;ll learn faster if you&#8217;re interested in the  project.<br />
3. Temp variables are <span style="text-decoration: underline;">awesome</span>.  So are ArrayLists.<br />
4.  Don&#8217;t let the sometimes snooty programming club people argue with you  &#8212; by the end of the year, you&#8217;ll probably know more.<br />
5. And NEVER  tell yourself you&#8217;re bad at coding.  EVER.  This just leads to failure.   See tenet 1.</p></blockquote>
<blockquote><p>Don&#8217;t trust the GridWorld.  Never code a method  unless necessary.</p></blockquote>
<blockquote><p><strong>BE PATIENT!</strong> It&#8217;s frustrating, yes, but when  you think about it  calmly and figure out what needs to be done and what  you need to do  that, end results will be exhilarating!  Side story: I  refused,  eventually, to help my friend on his work for another  programming class  because instead of thinking everything out, he gets  angry and rants  about how much CS sucks.  Honestly, being patient and  drawing things  out will be more helpful than sitting around and crying.</p></blockquote>
<blockquote><p>PAY  ATTENTION DURING GRIDWORLD INTRO.  If you don&#8217;t you&#8217;ll be mighty   confused.</p></blockquote>
<blockquote><p>Take loads of notes, pay attention and GO TO GOOGLE.</p></blockquote>
<blockquote><p>I didn&#8217;t sign up for AP CS, so I was surprised  when it became my favorite class and Ms. Martin my favorite teacher.   Appreciate that your teacher is passionate and knowledgeable about her  subject.  Don&#8217;t be afraid to ask for help, don&#8217;t give up when you get  frustrated, always make your code as pretty as possible, and celebrate  when you complete a task.</p></blockquote>
<blockquote><p>Use Ms. Martin &#8212; she&#8217;s a great  resource.  Don&#8217;t be afraid to look at what other coders have done before  you.  Stay ahead of deadlines if you can.  Enjoy yourself, work hard,  this class can be a blast.</p></blockquote>
<blockquote><p>Learn to speak in code.  It helps on  history papers when you write an essay in Java.  Also become a fan of  curly braces and other lingo that can make or break your program.  Also  love Ms. Martin.  She&#8217;s an awesome teacher and is driving herself broke  by teaching.</p></blockquote>
<blockquote><p>Use Eclipse and come in after school.  The teacher  actually teaches and helps &#8212; whoa!</p></blockquote>
<blockquote>
<pre><code>
for(int days = 1; days &lt;=  365; days++) {
    haveFun();
}
</code></pre>
</blockquote>
<blockquote><p>Stay on top of things and  don&#8217;t get behind!  Stay after school to get extra help.  Work with  others and form connections for help later in the class.</p></blockquote>
<blockquote><p>Work  hard, listen to Ms. Martin.  This IS the best class at Garfield, so be  sure to make the most of it.</p></blockquote>
<blockquote><p>Do all work early and finish as soon  as possible.  Ask Ms. Martin for help when needed and use patience.</p></blockquote>
<blockquote><p>AP  computer science is one of the funnest and most interesting classes I  have ever taken.  Remember to always compile your code so that it saves  and so that you can fix your errors as you go rather than having a giant  amount of errors by the time you finish.  Participate in programming  competitions &#8212; they&#8217;re fun and you learn a lot by working with others.</p></blockquote>
<blockquote><p>GOOD  LUCK!  Don&#8217;t get frustrated because the concepts become easier as a  person codes more and learns more.  Also, take advantage of class time!</p></blockquote>
<blockquote><p>Be  good at pinball.  Be committed if you are going to take this class and  study hard and often.  Make sure to stay on top of your projects and  don&#8217;t get behind.</p></blockquote>
<blockquote><p>Don&#8217;t jump in second semester!  Or I guess you  can if you really wanna!</p></blockquote>
<blockquote><p>Pay attention in class, don&#8217;t let  yourself get behind or it will suck.  Hard work doesn&#8217;t guarantee  success so be patient.  Ms. Martin is hella scary so don&#8217;t ask her for  anything. <img src='http://www.garfieldcs.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p></blockquote>
<blockquote><p>Don&#8217;t slack off!  Listen to the lecture because&#8230; IT ACTUALLY HELPS!!  When in doubt, ask for help or look back on slides.</p></blockquote>
<blockquote><p>Eclipse is your best friend.  Neglect your other  classes because this one is better.</p></blockquote>
<blockquote><p>It is a fascinating  logic-based environment with simply the best and most competent teacher  at Garfield.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.garfieldcs.com/2010/06/great-advice-from-0910-ap-cs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Guest Speaker: Ben Slivka</title>
		<link>http://www.garfieldcs.com/2010/05/guest-speaker-ben-slivka/</link>
		<comments>http://www.garfieldcs.com/2010/05/guest-speaker-ben-slivka/#comments</comments>
		<pubDate>Wed, 26 May 2010 00:21:32 +0000</pubDate>
		<dc:creator>Ms. Martin</dc:creator>
				<category><![CDATA[2009 AP CS A]]></category>
		<category><![CDATA[2010 Spring Exploring CS]]></category>
		<category><![CDATA[Programming Club]]></category>

		<guid isPermaLink="false">http://www.garfieldcs.com/?p=1297</guid>
		<description><![CDATA[We were lucky to have Ben Slivka join us in Exploring Computer Science and AP Computer Science.  Mr. Slivka is a computer scientist who worked at Microsoft from 1985 to 1999 and was involved in several exciting projects there, including starting Internet Explorer.  Since, he has worked at Amazon, started and recently sold Dreambox Learning, and has worked with several non-profits.
Mr. Slivka shared his ideas on the current state of computing technology as well as some of what is to come.  I took some notes as students asked questions and ...]]></description>
			<content:encoded><![CDATA[<p>We were lucky to have <a href="http://www.linkedin.com/in/benslivka" onclick="urchinTracker('/outgoing/www.linkedin.com/in/benslivka?referer=');">Ben Slivka</a> join us in Exploring Computer Science and AP Computer Science.  Mr. Slivka is a computer scientist who worked at Microsoft from 1985 to 1999 and was involved in several exciting projects there, including starting Internet Explorer.  Since, he has worked at Amazon, started and recently sold <a href="http://www.dreambox.com/" onclick="urchinTracker('/outgoing/www.dreambox.com/?referer=');">Dreambox Learning</a>, and has worked with several non-profits.</p>
<p>Mr. Slivka shared his ideas on the current state of computing technology as well as some of what is to come.  I took some notes as students asked questions and have done my best to recreate some of what was discussed.</p>
<p><strong>Which of the companies you worked in was the most fun?</strong><br />
Mr. Slivka told us that he had the most fun at Microsoft.  Starting  Internet Explorer was a creative and innovative endeavor involving great  people.  It was a lot of work, too &#8212; he told us that 80-100 hour weeks  were not uncommon for him!  Mr. Slivka first saw a web browser in 1994 (<a href="http://en.wikipedia.org/wiki/Mosaic_%28web_browser%29" onclick="urchinTracker('/outgoing/en.wikipedia.org/wiki/Mosaic_28web_browser_29?referer=');">Mosaic</a>)  and knew that it was an exciting development.  In fact, in 1995, he  wrote an internal memo on how important the web would become titled &#8220;<a href="http://www.justice.gov/atr/cases/exhibits/21.pdf" onclick="urchinTracker('/outgoing/www.justice.gov/atr/cases/exhibits/21.pdf?referer=');">The Web is the  Next Platform</a>.&#8221;  At the time, there were only a few thousand  websites as opposed to today&#8217;s tens of millions.</p>
<p>Mr. Slivka worked  with Internet Explorer through its third release and grew the team  from 7 to 69 engineers.  He shared with us that during his time at Microsoft, a person in the USA was more likely to become a Microsoft millionaire than an NBA player!</p>
<p><strong>Why did you leave Microsoft?<br />
</strong>Young Microsoft took lots of risks to become successful but as it has grown, it has become more concerned with protecting its primary products (Windows and Office) rather than innovating.  Around 1999, Mr. Slivka wanted to pursue Internet-related innovations but that was not the direction the company was taking.  The book <a href="http://www.breakingwindows.net/1prologue.htm" onclick="urchinTracker('/outgoing/www.breakingwindows.net/1prologue.htm?referer=');">Breaking Windows</a> covers the time when he was leaving Microsoft and the prologue is online.</p>
<p><strong>Is it scary to talk to company founders like Bill Gates (Microsoft) or Jeff Bezos (Amazon)?<br />
</strong>No!  According to Mr. Slivka, companies are a lot less hierarchical now than they were maybe 50 years ago so it&#8217;s natural for CEOs to have relatively frequent contact with their employees.  When he was at Microsoft, it was not unusual for him to trade e-mails and have face-to-face meetings with Bill Gates.</p>
<p><strong>What is one of the most exciting ideas in computer science?<br />
</strong>Mr. Slivka told us about <a href="http://en.wikipedia.org/wiki/Computational_complexity_theory" onclick="urchinTracker('/outgoing/en.wikipedia.org/wiki/Computational_complexity_theory?referer=');">computational complexity</a>, the study of the difficulty of programming tasks.</p>
<p><strong>Was it difficult to see OS/2 fail after 5 and a half years of work?<br />
</strong>Only doing things that will succeed is boring, says Mr. Slivka!  There is a lot more to learn from mistakes than from successes.  It was difficult to see such a big time and energy investment be lost but going through the process of creating the product was valuable.  OS/2 was a joint venture between Microsoft and IBM and their goals were different.</p>
<p><strong>What was the hardest project you were involved in?<br />
</strong>The human factor in projects is often the most difficult.  In 1998, Mr. Slivka was asked to take part in designing a new interface for Windows.  He and two others were in charge of the project and there was conflict among the leadership which made it difficult.</p>
<p><strong>What do you think of the iPad?<br />
</strong>It&#8217;s somewhere between a phone and a laptop and it&#8217;s hard to know where it fits in.  It still requires a PC since when turned on it wants to be synced to iTunes.  The device is too heavy but it does have a gorgeous screen.  The brushed aluminum is beautiful but very slippery.  Mr. Slivka sees it mostly as an expensive toy.  He reminded us that computing technology is like grocery store produce in that it has a limited shelf life.  This first version of the iPad is not likely to be popular for long.  The lack of multitasking and virtual memory are real limitations.</p>
<p><strong>Can you comment on the Apple vs. Adobe war?</strong><br />
Apple is playing defense right now by trying to protect their control over all aspects of their products.  The Flash battle is not about security or stability, it&#8217;s about market control and &#8212; ultimately &#8212; dollars.</p>
<p><strong>Which web browser do you use?<br />
</strong>IE7 was too slow and Mr. Slivka switched to Firefox.  He does not use Bing.</p>
<p><strong>What do you think about cloud computing?<br />
</strong>Offline computing still has a role since there is no pervasive connectivity yet.  If cloud computing means data is never lost, actions can be infinitely undone, groups can collaborate well, no need to worry about installations of software then it&#8217;s a great idea but in practice, there is no great implementation yet.  Google Docs doesn&#8217;t work well but it&#8217;s definitely possible to create a fully-functioning word editor in the cloud some day.</p>
<p><strong>What are the main privacy issues on the Internet?<br />
</strong>Mr. Slivka shared his policy: he doesn&#8217;t put anything up online that he wouldn&#8217;t be ok with being on the New York Times front page.  People should be thoughtful about what they share and market forces will work to punish companies that don&#8217;t respect privacy well enough.  In his opinion, the government is getting involved because it&#8217;s currently on people&#8217;s mind and will help politicians win elections.</p>
<p><strong>What will Google look like in the next few years?<br />
</strong>Google is now suffering from the same problem as Microsoft: Microsoft has revenue from Windows and Office and wants to protect those while Google has Search and AdWords and wants to protect those revenue streams.  Google&#8217;s challenge will be innovating beyond search and ads while making sure they can maintain their dominance as products like Bing get significant investment.  Their current strategy is to be everywhere (Android, Chrome, etc) and make Google the preferred platform so they can protect their search and ad dominance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garfieldcs.com/2010/05/guest-speaker-ben-slivka/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Final Project Ideas</title>
		<link>http://www.garfieldcs.com/2010/05/final-project-ideas/</link>
		<comments>http://www.garfieldcs.com/2010/05/final-project-ideas/#comments</comments>
		<pubDate>Mon, 17 May 2010 00:32:44 +0000</pubDate>
		<dc:creator>Ms. Martin</dc:creator>
				<category><![CDATA[2009 AP CS A]]></category>

		<guid isPermaLink="false">http://www.garfieldcs.com/?p=1275</guid>
		<description><![CDATA[You will spend the remaining month of AP Computer Science creating a project of your own design.  I realize that there&#8217;s a lot of pressure involved in coming up with a good project idea so I&#8217;m providing starting points below.  I&#8217;ve organized the ideas by category.  Note that the research-only (no coding) options can get you up to a 90% (if you do a stellar job) &#8212; after all, this is a programming class and I want to encourage you to choose an option that will result in a software ...]]></description>
			<content:encoded><![CDATA[<p>You will spend the remaining month of AP Computer Science creating a project of your own design.  I realize that there&#8217;s a lot of pressure involved in coming up with a good project idea so I&#8217;m providing starting points below.  I&#8217;ve organized the ideas by category.  Note that the research-only (no coding) options can get you up to a 90% (if you do a stellar job) &#8212; after all, this is a programming class and I want to encourage you to choose an option that will result in a software product.  That being said, this could be a great option for those of you who have found that programming is not quite for you and need a grade boost.</p>
<p>You are welcome to work in groups of up to three.  I reserve the right to veto groups.</p>
<h2>Grading</h2>
<p>Your grade will depend on:</p>
<p>- Remaining on task &#8212; very little off-topic chitchat, demonstration of good problem solving skills, etc.</p>
<p>- The project itself (paper, software, series of exercises demonstrating new skill, etc)</p>
<p>- A ~5min presentation showing off what you&#8217;ve done</p>
<p>- A 2-3 page writeup with the following sections:</p>
<div id="_mcePaste">• Project goal: What is the general problem addressed by your project?  Are you learning a new skill?  Are you designing a game for a particular niche?<br />
• Motivation: Why is what you&#8217;re doing valuable to you or others?<br />
• Design and architecture: Describe how the parts of your system fit together. What software tools did you choose to use and why?  What classes are you implementing and why?<br />
• Implementation challenges: What were the tricky problems you had to overcome, and how did you solve them?<br />
• Conclusion: How well did you achieve your goals?  Were you on task for the majority of the allotted time?  Are you proud of your product?</div>
<p>Some ideas I&#8217;ve thought of, in no particular order, and in no way meant to restrict your options.</p>
<h2><span style="font-weight: normal; font-size: 13px;"></p>
<h2 style="font-size: 1.5em;">Games in Java</h2>
<p>Games are a great source of interesting computer science problems.</p>
<p>- Focus on AI: write a command-line driven game for a popular board game such as Checkers or Othello.  You could even start with Tic-Tac-Toe.  Other games to write interesting AI for can be <a href="http://www.math.uaa.alaska.edu/~afkjm/ai_games/ai_games.html" onclick="urchinTracker('/outgoing/www.math.uaa.alaska.edu/_afkjm/ai_games/ai_games.html?referer=');">found here</a>.</p>
<p>- Focus on visuals: Learn to use Swing for graphics.  <a href="http://www.javacooperation.gmxhome.de/TutorialStartEng.html" onclick="urchinTracker('/outgoing/www.javacooperation.gmxhome.de/TutorialStartEng.html?referer=');">Here</a> is a pretty good tutorial on Java game programming.</p>
<p>- Set game: I have good starter code for getting you going with a graphical version of the game.</p>
<p>- Gridworld game: Check out ideas and starter code at <a href="http://www.themrmiller.com/ap/projects/ap11.shtml" onclick="urchinTracker('/outgoing/www.themrmiller.com/ap/projects/ap11.shtml?referer=');">http://www.themrmiller.com/ap/projects/ap11.shtml</a></p>
<h2 style="font-size: 1.5em;">Animation or visualization in Processing.js</h2>
<p>- Use information from the <a href="http://developer.nytimes.com/" onclick="urchinTracker('/outgoing/developer.nytimes.com/?referer=');">New York Times API</a> and display it in some interesting way.  You&#8217;ll need to figure out some standard Javascript and JSON which can be mixed with the Processing.js Java-like language.</p>
<h2>Game in Processing.js</h2>
<p>- Side scroller: for inspiration, check out <a href="http://gailcarmichael.com/processing/pianoman/" onclick="urchinTracker('/outgoing/gailcarmichael.com/processing/pianoman/?referer=');">Pianoman</a>, complete with source.</p>
<p>- Strategy game: for inspiration, check out <a href="http://gailcarmichael.com/processing/sheep/" onclick="urchinTracker('/outgoing/gailcarmichael.com/processing/sheep/?referer=');">Sheep Herding</a>, complete with source or the <a href="http://www.funny-games.biz/the-plumber.html" onclick="urchinTracker('/outgoing/www.funny-games.biz/the-plumber.html?referer=');">Plumber Game</a> (in Flash, but an interesting idea).</p>
<h2>Learn a new skill</h2>
<p>Now that you know the basics of Java, you&#8217;re ready to expand your CS knowledge very rapidly.</p>
<p>- Learn Python: Python is a modern, object-oriented scripting language.  It&#8217;s go lots of great libraries.  Teach yourself some Python and implement a relatively complex project in it &#8212; something like Baby Names.</p>
<p>- Learn JavaScript: JavaScript is a client-side web scripting language interpreted by browsers.  It allows for all kinds of cool interactivity in websites.  The patterns in JavaScript are different than those in Java so it will take some getting used to.  Learn the basics and then implement something like a hangman game or <a href="http://www.cs.washington.edu/education/courses/cse190m/08sp/homework/4/" onclick="urchinTracker('/outgoing/www.cs.washington.edu/education/courses/cse190m/08sp/homework/4/?referer=');">fifteen puzzle game</a> that runs in browser.</p>
<p>- Learn Swing: get to know Java&#8217;s graphics library.</p>
<h2>Research paper</h2>
<p>Note that the highest possible grade you can get on this is 90% if you do an amazing job.</p>
<p>Research an area of computing that interests you and write a paper and presentation about it.  You should use several trusted sources and use sources like Wikipedia just as starting points.  I would expect at least 5 pages of quality text accompanied by an engaging presentation.  Possible topics:</p>
<p>- Privacy.  For example, you could explore the history of the Facebook privacy settings and write a summary of how they currently stand and why they&#8217;re so controversial.  Alternately, you could look into the US&#8217; privacy laws and how they&#8217;re enforced.</p>
<p>- Artificial Intelligence.  What is?  What breakthroughs have there been?  What are useful applications?  Alternately, you could focus on one AI researcher or the evolution of a single project such as the ASIMO robot.</p>
<p>- Future of wireless technologies.  WIMAX, 4G, etc.  What impact they&#8217;ll have on businesses, why they&#8217;re not implemented yet, who will control them, etc.</p>
<p>- Open source software.  What is it?  What are examples of open source projects?  What open source licenses exist?  What controversies are there surrounding open source software?</p>
<p></span></h2>
]]></content:encoded>
			<wfw:commentRss>http://www.garfieldcs.com/2010/05/final-project-ideas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Processing.js</title>
		<link>http://www.garfieldcs.com/2010/05/processing-js/</link>
		<comments>http://www.garfieldcs.com/2010/05/processing-js/#comments</comments>
		<pubDate>Fri, 14 May 2010 04:21:26 +0000</pubDate>
		<dc:creator>Ms. Martin</dc:creator>
				<category><![CDATA[2009 AP CS A]]></category>

		<guid isPermaLink="false">http://www.garfieldcs.com/?p=1271</guid>
		<description><![CDATA[You will need to download this zip file and extract its contents to a convenient folder.  We will be working with Processing.js, which uses a language very similar to Java that later gets converted to JavaScript.  The advantages here are that you&#8217;ll be working with a familiar language and be able to create browser-ready projects.  Today I just want you playing around with a provided example (gogo.html in the zip file) and hopefully looking at the API.  Processing.js is an extremely powerful framework &#8212; check out a Tower Defense game ...]]></description>
			<content:encoded><![CDATA[<p>You will need to download <a href="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/05/Processing.js-lab.zip">this zip file</a> and extract its contents to a convenient folder.  We will be working with <a href="http://processingjs.org/" onclick="urchinTracker('/outgoing/processingjs.org/?referer=');">Processing.js</a>, which uses a language very similar to Java that later gets converted to JavaScript.  The advantages here are that you&#8217;ll be working with a familiar language and be able to create browser-ready projects.  Today I just want you playing around with a provided example (gogo.html in the zip file) and hopefully looking at <a href="http://processingjs.org/reference" onclick="urchinTracker('/outgoing/processingjs.org/reference?referer=');">the API</a>.  Processing.js is an extremely powerful framework &#8212; check out a <a href="http://ptdef.com/" onclick="urchinTracker('/outgoing/ptdef.com/?referer=');">Tower Defense game</a> to convince yourself of this.  Here&#8217;s another cool example which <a href="http://www.metanurb.com/ProcessingTweets.html" onclick="urchinTracker('/outgoing/www.metanurb.com/ProcessingTweets.html?referer=');">visualizes tweets about JavaScript</a>.</p>
<p>Today can be a fairly free-form exploration day, but if you&#8217;re unable to stay on task that way, here&#8217;s what I recommend you do to tweak gogo.html and get familiar with Processing.js:</p>
<p>- Change the canvas background to green when the animation starts.<br />
- Make the circle twice as big<br />
- Change the frame rate and see what happens<br />
- Change the delay and see what happens<br />
- Make the animation twice as big (800 x 800)<br />
- Make the white ring around the circle flash green when the circle is clicked<br />
- Make the circle follow your cursor as you click (like in <a href="http://www.huyng.com/archives/a-processingjs-example/197/" onclick="urchinTracker('/outgoing/www.huyng.com/archives/a-processingjs-example/197/?referer=');">this example</a>)</p>
<p>More complex things you may want to try:</p>
<p>- Write a Snake game!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garfieldcs.com/2010/05/processing-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Networks</title>
		<link>http://www.garfieldcs.com/2010/05/networks/</link>
		<comments>http://www.garfieldcs.com/2010/05/networks/#comments</comments>
		<pubDate>Tue, 11 May 2010 00:58:58 +0000</pubDate>
		<dc:creator>Ms. Martin</dc:creator>
				<category><![CDATA[2009 AP CS A]]></category>

		<guid isPermaLink="false">http://www.garfieldcs.com/?p=1256</guid>
		<description><![CDATA[Find out what your IP address is.  Note that any service with access to your IP address also knows where you are.
Use a ping tool to find out how long it takes to get to a particular server.  Try google, garfieldcs.com?  Note that this tool sends the ping from the network-tools.com server, NOT from your machine.  Compare with a ping from the command line.
Use a visual traceroute tool to find out the physical path information takes to get to you from a particular website.  Interesting searches might include bbc.co.uk gicp.org.gh ...]]></description>
			<content:encoded><![CDATA[<p>Find out <a href="http://whatismyipaddress.com/" onclick="urchinTracker('/outgoing/whatismyipaddress.com/?referer=');">what your IP address is</a>.  Note that any service with access to your IP address also knows where you are.</p>
<p>Use a <a href="http://network-tools.com/default.asp?prog=ping&amp;host=google.com" onclick="urchinTracker('/outgoing/network-tools.com/default.asp?prog=ping_amp_host=google.com&amp;referer=');">ping tool</a> to find out how long it takes to get to a particular server.  Try google, garfieldcs.com?  Note that this tool sends the ping from the network-tools.com server, NOT from your machine.  Compare with a ping from the command line.</p>
<p>Use a <a href="http://www.yougetsignal.com/tools/visual-tracert/" onclick="urchinTracker('/outgoing/www.yougetsignal.com/tools/visual-tracert/?referer=');">visual traceroute</a> tool to find out the physical path information takes to get to you from a particular website.  Interesting searches might include bbc.co.uk gicp.org.gh gcaa.com.gh (the last two sites are Ghanaian sites.  Where are they hosted?  Why?)<cite></cite></p>
<p>Do a <a href="http://www.yougetsignal.com/tools/whois-lookup/" onclick="urchinTracker('/outgoing/www.yougetsignal.com/tools/whois-lookup/?referer=');">whois lookup</a> to find out who, if anyone, owns a particular address.  Try your name?</p>
<p>Take a look at <a href="http://whattheyknow.cs.wpi.edu/" onclick="urchinTracker('/outgoing/whattheyknow.cs.wpi.edu/?referer=');">what information websites have about you</a> &#8212; they definitely know where you are and may be able to infer your age, gender, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garfieldcs.com/2010/05/networks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Critter notes</title>
		<link>http://www.garfieldcs.com/2010/04/critter-notes/</link>
		<comments>http://www.garfieldcs.com/2010/04/critter-notes/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 14:07:43 +0000</pubDate>
		<dc:creator>Ms. Martin</dc:creator>
				<category><![CDATA[2009 AP CS A]]></category>

		<guid isPermaLink="false">http://www.garfieldcs.com/?p=1172</guid>
		<description><![CDATA[Adapted from Cay Horstmann &#8212; thanks!
Critters are included in GridWorld to emphasize design.  The act method calls five methods, and subclasses override some or all of them to achieve some desired behavior.  (For those of you interested in digging deeper into programming and software engineering, the act method is an example of the &#8220;template method&#8221; design pattern.  Design patterns are a powerful way of expressing common best-practices about code structure.  Google it!)

When to use Critter
Not every actor can or should be represented as a
Critter. In the ...]]></description>
			<content:encoded><![CDATA[<p>Adapted from Cay Horstmann &#8212; thanks!</p>
<p>Critters are included in GridWorld to emphasize design.  The <code>act</code> method calls five methods, and subclasses override some or all of them to achieve some desired behavior.  (For those of you interested in digging deeper into programming and software engineering, the <code>act</code> method is an example of the &ldquo;template method&rdquo; design pattern.  Design patterns are a powerful way of expressing common best-practices about code structure.  Google it!)</p>
</p>
<h2>When to use <code>Critter</code></h2>
<p>Not every actor can or should be represented as a<br />
<code>Critter</code>. In the context of GridWorld, a <code>Critter</code> is not a warm and fuzzy<br />
creature, but an actor that first processes actors and then makes a move. Trying to make <code>Actor</code>s that don&#8217;t follow this pattern into <code>Critter</code>s will generally result in overly-complicated logic. </p>
<h2><code>Critter</code> rules</h2>
<p>Here are a few simple rules to remember when working with <code>Critters</code> (<strong>these don&#8217;t apply to bugs or other <code>Actor</code>s!</strong>).  They will be discussed in a little more detail below.</p>
<ul>
<li>Don&#8217;t override <code>act</code></li>
<li>A critter can change its state only in <code>processActors</code> or<br />
    <code>makeMove</code></li>
<li>A critter can change the state of other actors in <code>processActors</code></li>
</ul>
<h2><code>Critter</code> methods</h2>
<p>Each of the five methods called from <code>act</code> has postconditions that restrict what it can do. The following table shows the postconditions as they are stated in the GridWorld documentation.</p>
<p>Here, the <em>state</em> of an actor includes</p>
<ul>
<li>the location</li>
<li>the direction</li>
<li>the contents of any other instance variables</li>
</ul>
<table border="1" style="width: 100%">
<caption></caption>
<tbody>
<tr>
<td><code>getActors</code></td>
<td>The state of all actors is unchanged.</td>
</tr>
<tr>
<td><code>processActors</code></td>
<td>(1) The state of all actors in the grid other than this critter and<br />
        the elements of <code>actors</code> is unchanged. (2) The location of<br />
        this critter is unchanged.</td>
</tr>
<tr>
<td><code>getMoveLocations</code></td>
<td>The state of all actors is unchanged.</td>
</tr>
<tr>
<td><code>selectMoveLocation</code></td>
<td>(1) The returned location is an element of <code>locs</code> (the parameter of type <code>ArrayList&lt;Location&gt;</code>), this<br />
        critter&#8217;s current location, or <code>null</code>. (2) The state of<br />
        all actors is unchanged.</td>
</tr>
<tr>
<td><code>makeMove</code></td>
<td>(1) <code>getLocation() == loc</code>. (2) The state of all actors<br />
        other than those at the old and new locations is unchanged.</td>
</tr>
</tbody>
</table>
<p>If a critter wants to change its own state, it can only do so in <code>processActors</code> and <code>makeMove</code>. If it wants to change<br />
its location (or remove itself), it can only do so in <code>makeMove</code> (Removing an actor changes its state: its location becomes <code>null</code>).
</p>
<p>If a critter wants to change the state of another critter, it can only do so in <code>processActors</code>. (There is a teensy exception: <code>makeMove</code> removes the critter at the target location, and it may add a new critter to the old location.)</p>
<p>Note that <code>getActors</code>, <code>getMoveLocations</code>, and <code>selectMoveLocation</code> can&#8217;t change the state of <em>any</em> actor.
</p>
<p>Also note that <code>processActors</code> can only mutate actors that were handed to it, and <code>selectMoveLocations</code> can only select from the locations that were handed to it. The <code>makeMove</code> method has even less choice&mdash;it <em>must</em> move to the location given in the<br />
parameter. </p>
<p>These conditions significantly restrict what a critter can do, and how it can do it. When you design a particular critter, you need to distribute<br />
responsibilities among the five methods that are called by <code>act</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garfieldcs.com/2010/04/critter-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ant Farm Gridworld Project</title>
		<link>http://www.garfieldcs.com/2010/04/ant-farm-gridworld-project/</link>
		<comments>http://www.garfieldcs.com/2010/04/ant-farm-gridworld-project/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 13:39:32 +0000</pubDate>
		<dc:creator>Ms. Martin</dc:creator>
				<category><![CDATA[2009 AP CS A]]></category>

		<guid isPermaLink="false">http://www.garfieldcs.com/?p=1162</guid>
		<description><![CDATA[Thanks to Robert Glen Martin for the project idea and writeup.  Any errors are my own!
You will need to turn in whatever you have by 11:30pm on Monday April 11th.  No late work will be accepted &#8212; not turning anything in will result in a 0.
Introduction
This assignment is designed to get you thinking about the design of larger systems, to get a small introduction to artificial intelligence and to deepen your familiarity with GridWorld. Hopefully you&#8217;ll find it pretty cool &#8212; by the end, your ants should be ...]]></description>
			<content:encoded><![CDATA[<p>Thanks to Robert Glen Martin for the project idea and writeup.  Any errors are my own!</p>
<p>You will need to turn in whatever you have by 11:30pm on Monday April 11th.  No late work will be accepted &#8212; <strong>not turning anything in will result in a 0</strong>.</p>
<h3>Introduction</h3>
<p>This assignment is designed to get you thinking about the design of larger systems, to get a small introduction to artificial intelligence and to deepen your familiarity with GridWorld. Hopefully you&#8217;ll find it pretty cool &#8212; by the end, your ants should be acting in a coordinated fashion to collect food and bring it back to their queen.  I think it&#8217;s a great illustration of the power of object-oriented design.</p>
<p>This document does a lot more &#8220;hand holding&#8221; than the previous assignment descriptions have and I&#8217;m giving you a lot more starter code.  In a way, that&#8217;s more of a realistic programming situation than those we&#8217;ve experienced so far &#8212; many more people work on modifying and adapting systems than start them from scratch!  I also think this is a pretty good way of illustrating some core concepts without having you spin your wheels too much.  As you work through this project, you will complete an interface and both concrete and abstract classes.  Your solution will demonstrate inheritance, encapsulation, and polymorphism.</p>
<p>Begin by downloading  <a href="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/04/AntFarmStudent.zip">AntFarmStudent</a>, a zip file containing all the starter code.  Make sure you take a look at each class briefly to get a big-picture view of what the system should be doing and how the various pieces are connected together.</p>
<h3>Overview</h3>
<p>The project utilizes four new types of objects (see <strong>Figure 1</strong>), two kinds of food (<strong>A</strong> &#8211; <em>Cookie</em> and <strong>B</strong> &#8211; <em>Cake</em>) and two kinds of ants (<strong>C</strong> &#8211; <em>WorkerAnt</em> and <strong>D</strong> &#8211; <em>QueenAnt</em>).  Initially, the worker ants walk around in search of food.  When they find food, they take a bite.  Ants with food turn red.  Then the worker ants go in search of a queen ant to give food.  Once they give their food to a queen, they turn black and go back to get more food.</p>
<table border="0">
<caption><strong>Figure 1 &#8211; Ant Farm (Initial Sate) &#8211; Worker ants hunt for food.</strong></caption>
<tbody>
<tr>
<td><a href="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/04/figure1.png"><img class="alignleft size-medium wp-image-1170" title="figure1" src="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/04/figure1-243x300.png" alt="" width="243" height="300" /></a></td>
</tr>
</tbody>
</table>
<p><em>Food</em> and queens remain stationary.  Worker ants remember the locations of the food and<br />
queen.  Additionally, they share those locations with other worker ants they meet.</p>
<p>When the Ant Farm program starts, the worker ants are spread around the grid in random<br />
locations.  Initially, they are disorganized as they search for food.  As the worker<br />
ants start to find food and the queen, they get more organized (see <strong>Figure 2</strong> below).<br />
After all the ants learn the locations, they exhibit an emergent behavior that is<br />
very organized (see <strong>Figure</strong> 3 below).</p>
<table border="0">
<caption><strong>Figure 2 &#8211; Intermediate State &#8211; worker ants start learning locations of food &amp; queen.</strong></caption>
<tbody>
<tr>
<td><a href="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/04/figure2.png"><img class="alignleft size-medium wp-image-1165" title="figure2" src="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/04/figure2-243x300.png" alt="" width="243" height="300" /></a></td>
</tr>
</tbody>
</table>
<table border="0">
<caption><strong>Figure 3 &#8211; Final State &#8211; worker ants know locations of food &amp; queen.</strong></caption>
<tbody>
<tr>
<td><a href="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/04/figure3.png"><img class="alignleft size-medium wp-image-1166" title="figure3" src="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/04/figure3-243x300.png" alt="" width="243" height="300" /></a></td>
</tr>
</tbody>
</table>
<h3>Program Organization</h3>
<p><strong>Figure 4</strong> shows the organization of the Ant Farm classes and interface.</p>
<table border="0">
<caption><strong>Figure 4 &#8211; Ant Farm Classes</strong></caption>
<tbody>
<tr>
<td><a href="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/04/AntFarmClasses.png"><img class="alignleft size-full wp-image-1163" title="AntFarmClasses" src="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/04/AntFarmClasses.png" alt="" width="295" height="245" /></a></td>
</tr>
</tbody>
</table>
<p>Recall that GridWorld has a &#8220;built-in&#8221; <em>Actor</em> class for objects that &#8220;live&#8221; in the grid.<em> Actor</em>s that have minimal interaction with other objects in the grid normally inherit from <em>Actor</em>.  This is appropriate for <em>QueenAnt</em> and Food.  <em>Cake</em> and <em>Cookie</em> inherit indirectly from <em>Actor</em> through their immediate parent, the abstract class Food.</p>
<p>Also recall that <em>Critter</em> is a GridWorld type derived from <em>Actor</em>.  <em>Critter</em>s have a particular pattern for their act useful for interacting with other <em>Actor</em>s.  <em>WorkerAnt</em>s need to &#8220;communicate&#8221; with the <em>QueenAnt</em>, <em>Cake</em>, <em>Cookie</em>, and other <em>WorkerAnt</em> objects so inheriting from <em>Critter</em> is appropriate for them.</p>
<p>Ant Farm also requires a <em>Processable</em> interface.  This interface has a single process method that is the key to communication between worker ants and the other <em>Actor</em>s.  By implementing a common interface, <em>QueenAnt</em>, <em>Cake</em>, <em>Cookie</em>, and <em>WorkerAnt</em> objects will be able to be used interchangeably when they need to communicate.</p>
<h3>Starter Code</h3>
<p><em>AntFarmRunner</em> (the application) is complete and requires no changes.  The needed imports, class headings, method headings, block comments, and image (gif) files are provided for the remaining classes.  Place the gif files in the same directory as your .class files are stored. The interface heading and comments are provided for <em>Processable</em>.</p>
<p><strong>Compiling early and often is a good programming practice</strong>.  It helps identify errors when they are easiest to fix.  Compile and execute the project.  You should see all the <em>Actor</em>s on the screen.  All the <em>Actor</em>s are blue at this point.  Why? (Hint: think about which parent classes are involved)</p>
<p><strong>Note</strong>: Clicking the <strong>Step</strong> or <strong>Run</strong> button at this point will cause a <em>NullPointerException</em> since many of the method bodies just return null for the time being.  This is another great design tactic: writing headers for all methods before implementation really helps catch problems with a project&#8217;s design early on.  Of course, a header that includes a return type will keep the method from compiling unless something really is returned.  It&#8217;s typical to return &#8220;&#8221; as a placeholder for a method that must return a String or 0 for int or double methods.  The corresponding value for objects is <em>null</em>.  Unsurprisingly this practice is likely to cause run-time <em>NullPointerException</em>s.  At this point, that&#8217;s totally fine &#8212; we&#8217;re just interested in making sure there are no compile-time errors.</p>
<h3>Processable Interface</h3>
<p>The Processable interface is a key component of the Ant Farm design and a great opportunity for you to better understand the value of interfaces as well as some of the details of polymorphism.  Examine the <em>Processable.java</em> file.  You should see that the interface contains a single method: <em>process</em>.  The process method is used to communicate with the <em>WorkerAnt</em> object passed in as a parameter.  This allows for communication between your Ant Farm&#8217;s objects.  Since <em>QueenAnt</em>, Food, and <em>WorkerAnt</em> all implement the Processable interface, they must all implement the <em>process</em> method.  The beauty of this is that all classes which implement the Processable interface can be initialized as or cast into Processable objects.  Here are examples of how this works:</p>
<pre>	WorkerAnt andy = new WorkerAnt();
	Processable c = new Cake();
	c.process(andy); // no problem since Processable requires process method
	c.act(); // error because the reference type (Processable) does not implement an act method.
	// It doesn't matter that Cake actually implements act!  The variable c can only use methods declared in the Processable interface.

	((Processable)andy).process(new WorkerAnt()); // an example of casting to Processable 

	ArrayList l = new ArrayList();
	l.add(new Cake());
	l.add(new WorkerAnt());
	l.add(new QueenAnt());
	for(Processable p : l) {
		p.process(andy);
	}</pre>
<p>Notice that the process method can be called polymorphically on any object which implements Processable.  Sweet!!</p>
<p>As described, the <em>Processable</em> interface should contain a single void <em>process</em> method which takes one parameter of type <em>WorkerAnt</em>.  Add the abstract <em>process</em> method in the <em>Processable</em> interface.</p>
<p>Compile the project and correct any errors.</p>
<p>You will later implement the process method in each class which implements the interface.  The individual <em>process</em> methods in each class will do the following (repeated later):</p>
<ul>
<li><em>QueenAnt</em>
<ul>
<li>Get food from the worker ant.</li>
<li>Give the queen&#8217;s location to the worker ant.</li>
</ul>
</li>
<li><em>Food</em>
<ul>
<li>Give food to the worker ant.</li>
<li>Give the food&#8217;s location to the worker ant.</li>
</ul>
</li>
<li><em>WorkerAnt</em>
<ul>
<li>Give the saved food location to the other worker ant.</li>
<li>Give the saved queen location to the other worker ant.</li>
</ul>
</li>
</ul>
<h3>QueenAnt Class</h3>
<p><strong>Figure 5</strong> shows the <em>QueenAnt</em> class.  Queen ants are the simplest of the new Ant Farm objects.</p>
<table style="height: 10px;" border="0" width="10">
<caption><strong>Figure 5 QueenAnt Class.</strong></caption>
<tbody>
<tr>
<td><img src="&lt;a href=" alt="" /><a href="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/04/figure5.png"><img class="alignleft size-full wp-image-1167" title="figure5" src="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/04/figure5.png" alt="" width="454" height="433" /></a></td>
</tr>
</tbody>
</table>
<p>Start updating <em>QueenAnt</em> by adding the new <em>foodQuantity</em> instance field.  It is used to contain the total amount of food that has been given to the queen by the worker ants.  <strong>You will make all instance fields <em>private</em> to preserve encapsulation.</strong></p>
<p>Write the constructor body.  It needs to initialize <em>foodQuantity</em> to 0 and use the inherited<em> setColor</em> method to set the queen&#8217;s color to <em>Color.MAGENTA</em>.</p>
<p>Since <em>QueenAnt</em> implements <em>Processable</em>, you need to write the <em>process</em> method.  <em>process</em> needs to get food from the passed worker ant using the <em>WorkerAnt</em> <em>giveFood</em> method.  This method, which is shown in <strong>Figure 7</strong> below, returns an <em>int</em> amount which should be added to <em>foodQuantity</em>.<em> process</em> also needs to provide the worker ant with queen&#8217;s location by calling the <em>WorkerAnt</em><em> shareQueenLocation</em> method.  Write the <em>process</em> method.</p>
<p>The <em>Actor</em> <em>act</em> method needs to be overridden with an empty &#8220;do nothing&#8221; method (<em>QueenAnt</em>s don&#8217;t act).  Look at <em>QueenAnt</em> to see how this was accomplished.  Note the use of the @Override annotation (on the line preceding the act method heading).  You don&#8217;t need to remember this, but <em>@Override</em> is very helpful.  If you accidentally misspell the method name, <em>@Override</em> will cause a compile error telling you about this mistake.  This error can be very difficult to find otherwise.  Compiler errors may cause you irritation, but they&#8217;re much, much better than silent mistakes!!  Many of you experienced problems that didn&#8217;t cause errors but just made your program fail with ShoppingCart.</p>
<p>The <em>Actor</em> <em><em>toString</em></em> method also needs to be overridden to add additional information to the string returned by <em>Actor</em>&#8216;s <em>toString</em>.  Notice that the <em>Actor</em> toString() already provides useful information: the Actor type, its location, its direction and its color.  We&#8217;d like to retain this behavior so this provides a good example of using super to call a superclass method.  Here is the code you will need:</p>
<pre>	return super.<em>toString</em>() + ", FQty=" + <em>foodQuantity</em>;</pre>
<p>Compile and execute your project.  The queen ant at location (15, 9) should now be magenta.  Hover your mouse over the queen &#8212; you should get &#8220;QueenAnt[location=(9, 15),direction=0,color=java.awt.Color[r=255,g=0,b=255]], FQty=0&#8243;.</p>
<h3>Foods &#8211; Food, Cake, and Cookie Classes</h3>
<p><strong>Figure 6</strong> shows the <em>Food</em>, <em>Cake</em>, and <em>Cookie</em> classes.  Foods act like queens, but they give food instead of getting it.</p>
<table border="0">
<caption><strong>Figure 6 &#8211; Food, Cake, and Cookie Classes.</strong></caption>
<tbody>
<tr>
<td><a href="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/04/figure6.png"><img class="alignleft size-full wp-image-1168" title="figure6" src="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/04/figure6.png" alt="" width="453" height="567" /></a></td>
</tr>
</tbody>
</table>
<p>Different kinds of food are very similar.  They differ only by the size of a bite and the displayed image (note that the image displayed is simply the name of the class with .gif at the end).  To take advantage of this similarity, the common instance fields and methods are placed in a <em>Food</em> super class.  This class contains no abstract methods,<br />
but it is declared abstract so that it can not be instantiated.  <strong>The use of abstract classes is important for you to understand!</strong> It doesn&#8217;t make sense to have a thing which is a &#8216;food&#8217; &#8212; that&#8217;s not specific enough.  So in this case, we&#8217;re deliberately blocking instantiation of <em>Food</em>s even though the class contains complete code.</p>
<p>All foods have both bite sizes and keep track of the total amount that has been eaten.  So, instead of repeating<br />
this information in both <em>Cake</em> and <em>Cookie</em>, it is stored in <em>Food</em> instance fields:</p>
<ul>
<li><em>BITE_SIZE</em> &#8211; a constant that determines how much food is given to a worker ant when it gets food.</li>
<li><em><em>foodEaten</em></em> &#8211; keeps track of the total amount of food &#8220;given&#8221; to worker ants.</li>
</ul>
<p>The constructor initializes <em>BITE_SIZE</em> to the <em>bite</em> value passed in the parameter, initializes <em>foodEaten</em> to 0, and calls <em>setColor(null)</em> so that the Cake.gif and Cookie.gif images display with their original coloring.</p>
<p>Update <em>Food</em> to include the two new instance fields and complete the constructor as discussed above.  You will need to uncomment the constructor heading and brackets.  Note that Java allows constant (<em>final</em>) instance fields to be initialized in a constructor <strong>but not to be modified anywhere else</strong>.</p>
<p>Compile your Ant Farm project again.  <em>Food</em> should have no errors, but <em>Cake</em> and <em>Cookie</em> now have compile errors.  Why?  What change caused these errors?  Recall that subclasses do not inherit their superclass&#8217; constructors.  We will fix these errors later.</p>
<p>All foods implement the <em>process</em> method (from <em>Processable</em>) to give food to the passed worker ant and to provide it the food&#8217;s location.  Foods need to override the <em>Actor act</em> method with an empty &#8220;do nothing&#8221; method (foods don&#8217;t act).  Foods also need to override the <em>toString</em> method to include the <em>BITE_SIZE</em> and <em>foodEaten</em> information.  Since all three of these methods are the same for all foods, they are placed in <em>Food</em>.  Otherwise they would have to be written in both <em>Cake</em> and <em>Cookie</em>.</p>
<p>Write the <em>process</em> method (use <em>WorkerAnt</em>&#8216;s <em>takeFood</em> and <em>shareFoodLocation</em> methods).  Also replace the body of the <em>toString</em> method as discussed above.  Don&#8217;t forget to include the<em> Actor</em> super class <em>toString</em> information like you did with <em>QueenAnt</em>.  Make sure that <em>Food</em> compiles without error.</p>
<p>Because of the <em>Food</em> class, the <em>Cake</em> and <em>Cookie</em> classes are very simple.  They contain a single class constant BITE which contains the size of a bite.  They each have a one statement constructor which passes the value of BITE to the <em>Food</em> constructor.</p>
<p>Complete the <em>Cake</em> and <em>Cookie</em> classes by adding the BITE class constants (see <strong>Figure 6</strong> for the appropriate values).</p>
<p>Complete the <em>Cake</em> and <em>Cookie</em> constructors by adding a single statement &#8211; <em>super(BITE)</em>; This causes the one parameter <em>Food</em> constructor to be used when a <em>Cake</em> or <em>Cookie</em> is created.</p>
<p>Compile and execute the project.  The cake and cookie should now display properly.  They should not be tinted.  Hover your mouse above the cake and cookie images to make sure that the <em>toString</em> methods are working properly.  For example, the cookie should display &#8220;(2, 2) contains Cookie[location=(2, 2),direction=0,color=null], BSize=1, FEaten=0&#8243;</p>
<h3>WorkerAnt Class</h3>
<p><em>WorkerAnt</em> (<strong>Figure 7</strong>) is the most complex Ant Farm class.  This is to be expected,<br />
since <em>Critter</em>s interact with other <em>Actor</em>s in the grid.</p>
<table border="0">
<caption><strong>Figure 7 &#8211; WorkerAnt Class.</strong></caption>
<tbody>
<tr>
<td><a href="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/04/figure7.png"><img class="alignleft size-full wp-image-1169" title="figure7" src="http://www.garfieldcs.com/wordpress/wordpress/wp-content/uploads/2010/04/figure7.png" alt="" width="479" height="725" /></a></td>
</tr>
</tbody>
</table>
<p>Worker ants have instance fields to keep track of the amount of food they currently have as well as known locations of the food and the queen.</p>
<p>The constructor initializes these instance fields (to <em>0, null</em>, and <em>null</em>), makes the ant black, and uses <em>Math.random</em> to randomly point the ant in one of the eight valid compass directions.</p>
<p>Add the <em>WorkerAnt</em> instance fields and complete the constructor as discussed above and in <strong>Figure 7</strong>.  Use the <em>Location</em> constants <em>HALF_RIGHT</em> and <em>FULL_CIRCLE</em> when writing your constructor.  Do not &#8220;hard code&#8221; constants like 45 and 8.  Compile and execute the project to check your code.</p>
<p><em>WorkerAnt</em> implements the <em>process</em> method to share queen and food locations with other worker ants. <em>WorkerAnt</em> has four methods that do the actual &#8220;processing.&#8221;  They are<em> takeFood</em> , <em>giveFood</em> , <em>shareFoodLocation</em>, and <em>shareQueenLocation</em>.  These methods are called from the <em>process</em> methods of the <em>QueenAnt</em>, <em>Food</em>, and <em>WorkerAnt</em> classes.</p>
<p>Complete the five processing methods as follows.  Make sure that the project compiles after every change.</p>
<ol>
<li><em>process</em> &#8211; call the passed worker ant&#8217;s <em>shareFoodLocation</em> and <em>shareQueenLocation</em> methods to<br />
share the food and queen locations with the other ant.</li>
<li><em>takeFood</em> &#8211; add the amount of food passed in <em>fQty</em> to the food quantity instance field.</li>
<li><em>giveFood</em> &#8211; replace the method body to return the current food quantity to the caller<br />
(queen).  Before <em>giveFood</em> exits, the food quantity needs to be reset to zero (all the food is<br />
being given to the queen).</li>
<li><em>shareFoodLocation</em> &#8211; Foods and worker ants call <em>shareFoodLocation</em> to share the food location.<br />
If the current saved food location is null, then set it to the value of <em>fLoc</em>.</li>
<li><em>shareQueenLocation</em> &#8211; Queens and worker ants call <em>shareQueenLocation</em> to share the queen<br />
location.  If the current saved queen location is <em>null</em>, then set it to the value of <em>qLoc</em>.</li>
</ol>
<p>You are about ready to override several of the <em>Critter act</em> methods, but first you will need to complete the useful <em>getDesiredDirecton</em> private helper method.  This method returns the general direction that the ant wants to go.</p>
<p>Replace the <em>getDesiredDirecton</em> body to return one of three directions:</p>
<ol>
<li>If the queen location is not null and the food quantity is not zero, then return the direction from this<br />
ant toward the known location of the queen (use <em>Location</em> &#8216;s <em>getDirectionToward</em> method).</li>
<li>Otherwise, if the food location is not null and the food quantity is zero, then return the direction from<br />
this ant toward the known location of the food.</li>
<li>Otherwise, return the current direction of this ant.</li>
</ol>
<p>The <em>Critter act</em> method calls the following methods in this order:</p>
<ol>
<li><em>getActor</em>s &#8211; gets a list of <em>Actor</em>s for interaction.</li>
<li><em>processActors</em> &#8211; interacts with each of the <em>Actor</em>s in the list from <em>getActors</em>.</li>
<li><em><em>getMoveLocations</em></em> &#8211; gets a list of possible locations for moving this critter.</li>
<li><em><em>selectMoveLocation</em></em> &#8211; chooses one of the possible move locations for this critter.</li>
<li><em><em>makeMove</em></em> &#8211; moves this critter.</li>
</ol>
<p><em>WorkerAnt</em> inherits the <em>Critter act</em> method which does the following:</p>
<ol>
<li>Uses the inherited <em>getActor</em>s to get all the adjacent neighboring <em>Actor</em>s.</li>
<li><em>processActor</em>s processes each of the neighboring ant farm actors.  This method should be very short.<br />
It needs a loop to traverse (loop through) the <em>actors ArrayList</em>.  An enhanced for loop works well for this.<br />
Each <em>actor</em> in <em>actors</em> needs to call its <em>process</em> method.  The parameter for each call will be <em>this</em>, the<br />
reference to the worker ant executing the <em>processActors</em> method.An <em>Actor</em> could be a <em>QueenAnt</em>, a <em>Cake</em>, a <em>Cookie</em>, or a <em>WorkerAnt</em>.  Without the <em>Processable</em> interface,<br />
<em>processActors</em> would need to determine the type of <em>actor</em> and then downcast the <em>actor</em> reference<br />
before making the call to <em>process</em>.  But, since each of these classes implements <em>Processable</em>,<br />
<em>processActors</em> only needs to cast the <em>actor</em> to <em>Processable</em> before the call.  This polymorphic<br />
processing is allowed because <em>Processable</em> contains the <em>process</em> abstract method.  The Java Run<br />
Time Environment (JRE) determines the actual type of object at runtime and calls the appropriate <em>process</em> method.</p>
<p>Complete the <em>processActors</em> method as discussed in the preceding paragraphs.</li>
<li><em>getMoveLocations</em> does the following:
<ol type="a">
<li>Calls the private <em>getDesiredDirecton</em> method to get the general direction the ant wants to move.</li>
<li>Creates a list with up to three adjacent locations that are in the general direction of the one returned<br />
by <em>getDesiredDirection</em>.  Locations are included if they meet all of the following criteria.  They must be:</p>
<ol type="i">
<li>Adjacent to the current location.</li>
<li>In the desired direction, or 45 degrees to the left of the desired direction, or 45 degrees to the right<br />
of the desired direction.</li>
<li>Valid (in the grid).</li>
<li>Empty.</li>
</ol>
</li>
<li>Returns the list of locations.Replace the <em>getMoveLocations</em> body as discussed above.  For part b, use <em>Location</em> &#8216;s <em>HALF_LEFT</em> and <em>HALF_RIGHT</em><br />
constants.  You may also want to use the <em>getAdjacentLocation</em> method, <em>Grid</em>&#8216;s <em>isValid</em> to see if a given location<br />
is valid (is in the grid) and <em>get</em> to help see if the location is empty (<em>get</em> returns <em>null</em>).  There are other possible implementations, though.</li>
</ol>
</li>
<li>Uses the inherited <em>selectMoveLocation</em> to randomly select one of the possible locations.  If the list of<br />
possible locations is empty, it returns the current location.</li>
<li>If the selected move location is different from the current location, <em>makeMove</em> moves to the selected<br />
location and changes its direction to match the direction it moved.  Otherwise it stays put and changes its<br />
direction by randomly choosing between the two directions 45 degrees to the left or right (use <em>Location</em>.<em>HALF_LEFT</em><br />
and <em>Location</em>.<em>HALF_RIGHT</em> ).  Then, in either case, it sets its color based on if it has food (red) or not (black).Write the body of the <em>makeMove</em> method as discussed above.</p>
<p>Complete the <em>toString</em> body to include <em>Critter</em>&#8216;s <em>toString</em> result as well as the values of the <em>WorkerAnt</em> instance<br />
fields.</p>
<p>Compile and thoroughly test your project.  Make sure that your actors behave properly as described in the<br />
<strong>Overview</strong> section at the beginning of this assignment.  You can learn a lot about the the state of your actors<br />
by viewing their <em>toString</em> information (hover over the object).  Make sure this information changes appropriately<br />
as your <em>Actor</em>s interact with each other.</li>
</ol>
<p><strong>Congratulations, your Ant Farm should now be exhibiting intelligent behavior!  You have completed what you need to do for this assignment.  If you&#8217;re done, I expect you to complete the following extensions!</strong></p>
<h3>Extensions</h3>
<p>Now that you know how all the classes interact change and expand your Ant Farm classes to do the following.</p>
<ol>
<li>Give <em>Food</em> and <em>WorkerAnt</em> weight.  Start each food item with the weight of 5,000,000 micrograms and<br />
each ant with a weight of 1,000 micrograms plus or minus 300 micrograms.<br />
Ants can carry up  to <a href="http://www.ftexploring.com/think/superbugs_p2.html" target="frame" onclick="urchinTracker('/outgoing/www.ftexploring.com/think/superbugs_p2.html?referer=');">20 times</a> their own body weight.<br />
When an ant takes a bite from the food, the food weight<br />
is decrease by 20 times the ant&#8217;s body weight, which is the amount carried off by the ant.<br />
When the food weight gets to zero have the food removed from the grid.</p>
<p>You do not need the constants <em>BITE_SIZE</em> nor the instance variable <em>bite</em> any more.  Remove all reference from the <em>Food</em>,<br />
<em>Cake</em> and <em>Cookie</em> classes.</p>
<p>Remember to use constants for values you create and to update the <em>toString</em> methods!</li>
<li>When <em>WorkerAnt</em>s come back to a food location they remembered, and the food has disappeared, change the remembered food<br />
location to inidcate the food is gone.  This information should be propagated to the rest of the ants.</p>
<p>This is tricky to figure out.  Do not add any additional instance fields.  When a <em>Food</em>&#8216;s weight becomes zero, it removes itself<br />
from the grid. Make sure the food object only shares it&#8217;s location if it is in the grid!<br />
The <em>AntWorker makeMove</em> method  now checks to see if the food is not at the location where it is suppose to be.  If this is the case,<br />
then change the food location to a bogus location that is not found in the grid!  The method<br />
<em>getDesiredDirection</em> will have to be altered slightly for this process to work,  plus the method <em>shareFoodLocation</em> will<br />
have to be altered .  It might be helpful to write private<br />
help methods <em>isFoodLocationInGrid(Location)</em> and <em>isBogusLocation(Location)</em> that determines if a food location is still<br />
in the grid or is a bogus location.  To get the logic correct for <em>shareFoodLocation</em> create a matrix with all the possiblities:</p>
<table border="1">
<tbody>
<tr>
<td></td>
<td>null</td>
<td>Good</td>
<td>Bogus</td>
</tr>
<tr>
<td>null</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Good</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Bogus</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</li>
<li>Add energy to the <em>WorkerAnt</em> class.<br />
Ants should start with 100 units of energy and for each step the ant should lose energy by:</p>
<ul>
<li>If the ant cannot move it looses 1 unit of energy and 1 microgram of weight.</li>
<li>If the ant can move and it is not carrying any food it looses 2 units of energy and 2 micrograms of weight.</li>
<li>If the ant can move and it is carrying food it looses 2 units of energy plus the amount it is carrying divided by 10,000<br />
units of energy.  It also losses 3 micrograms of weight.</li>
</ul>
</li>
<li>Ants gain energy when they find food.  They should eat 1/4 of their body weight of food, which in turn is converted into<br />
<em>(food eaten) / 1000</em> units of energy.  Weight is increased by<br />
<em>(food eaten) / 200</em> micrograms.  Remember the ant&#8217;s bite of food is still 20 times the ant&#8217;s body weight.</li>
<li>Ants die when their energy or weight is reduced to 0.  If they are carrying food when they die a food item should be placed in the cell that<br />
the ant dies in.  The food created should be randomly selected (cake or cookie) with the weight of food being carried by the ant.  You<br />
could add what kind of food the ant is carrying, then drop that same kind of food when the ant dies.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.garfieldcs.com/2010/04/ant-farm-gridworld-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vocabulary list</title>
		<link>http://www.garfieldcs.com/2010/03/vocabulary-list/</link>
		<comments>http://www.garfieldcs.com/2010/03/vocabulary-list/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 01:51:08 +0000</pubDate>
		<dc:creator>Ms. Martin</dc:creator>
				<category><![CDATA[2009 AP CS A]]></category>

		<guid isPermaLink="false">http://www.garfieldcs.com/?p=1132</guid>
		<description><![CDATA[


Concept
Definition


Abstract method
A method that is declared (as in an interface) but not implemented.  Abstract methods represent the behavior that a class promises to implement when it implements an interface.


Accessor
Instance method that provides information about the state of an object without modifying it.


Behavior
A set of actions an object can perform, often reporting or modifying its internal state.


Client code
Code that interacts with a class or objects of that class.


Code Reuse
Practice of writing program code once and sing it in many contexts (inheritance, parameterization are examples of code reuse techniques).


Encapsulation
Hiding implementation details ...]]></description>
			<content:encoded><![CDATA[<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>Concept</td>
<td>Definition</td>
</tr>
<tr>
<td>Abstract method</td>
<td>A method that is declared (as in an interface) but not implemented.  Abstract methods represent the behavior that a class promises to implement when it implements an interface.</td>
</tr>
<tr>
<td>Accessor</td>
<td>Instance method that provides information about the state of an object without modifying it.</td>
</tr>
<tr>
<td>Behavior</td>
<td>A set of actions an object can perform, often reporting or modifying its internal state.</td>
</tr>
<tr>
<td>Client code</td>
<td>Code that interacts with a class or objects of that class.</td>
</tr>
<tr>
<td>Code Reuse</td>
<td>Practice of writing program code once and sing it in many contexts (inheritance, parameterization are examples of code reuse techniques).</td>
</tr>
<tr>
<td>Encapsulation</td>
<td>Hiding implementation details of an object from its clients.  Provides abstraction and protects the integrity of an object.</td>
</tr>
<tr>
<td>extends</td>
<td>Keyword used to establish an inheritance relationship.</td>
</tr>
<tr>
<td>Field</td>
<td>A variable inside an object that makes up part of its internal state.</td>
</tr>
<tr>
<td>implements</td>
<td>Keyword used to implement an interface.</td>
</tr>
<tr>
<td>Implicit parameter</td>
<td>The object that is referenced during an instance method call.</td>
</tr>
<tr>
<td>Inheritance</td>
<td>A programming technique allowing a derived class to inherit all of a base class&#8217; state and behavior and extend its functionality.</td>
</tr>
<tr>
<td>Inheritance hierarchy</td>
<td>A set of hierarchical relationships between classes of objects (is-a relationships).</td>
</tr>
<tr>
<td>Instance method</td>
<td>A method inside an object that operates on that object.</td>
</tr>
<tr>
<td>Interface</td>
<td>A type that consists of a set of method declarations; when classes promise to implement an interface, you can treat those classes similarly in your code</td>
</tr>
<tr>
<td>Mutator</td>
<td>Instance method that modifies the object&#8217;s internal use.</td>
</tr>
<tr>
<td>Object</td>
<td>A programming entity that contains state (data) and behavior (methods).</td>
</tr>
<tr>
<td>Object-oriented Programming</td>
<td>Reasoning about a program as a set of objects rather than as a set of actions.</td>
</tr>
<tr>
<td>Override</td>
<td>To implement a new version of a method to replace code that would otherwise have been inherited from a superclass.  No special syntax is required.</td>
</tr>
<tr>
<td>State</td>
<td>A set of values (internal data) stored in an object.</td>
</tr>
<tr>
<td>Subclass</td>
<td>Child or derived class in an inheritance relationship.</td>
</tr>
<tr>
<td>Superclass</td>
<td>Parent class in an inheritance relationship.</td>
</tr>
<tr>
<td>this</td>
<td>Java keyword that allows reference to the implicit parameter inside a class.</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.garfieldcs.com/2010/03/vocabulary-list/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Jumper class</title>
		<link>http://www.garfieldcs.com/2010/03/jumper-class/</link>
		<comments>http://www.garfieldcs.com/2010/03/jumper-class/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 01:34:08 +0000</pubDate>
		<dc:creator>Ms. Martin</dc:creator>
				<category><![CDATA[2009 AP CS A]]></category>

		<guid isPermaLink="false">http://www.garfieldcs.com/?p=1129</guid>
		<description><![CDATA[You will complete the Jumper class as detailed in the GridWorld case study part 3 document.  I&#8217;ve rewritten some of the instructions here &#8212; follow these!!
Requirements
You will create a class called Jumper.	This actor can move forward two cells in each move. It “jumps” over rocks and flowers. It does not leave anything behind it when it jumps.
Before you get going, you need to figure out how you will address the following situations:

What will a jumper do if the location in front of it is empty, but the location two cells ...]]></description>
			<content:encoded><![CDATA[<p>You will complete the Jumper class as detailed in the GridWorld case study part 3 document.  I&#8217;ve rewritten some of the instructions here &#8212; follow these!!</p>
<h3>Requirements</h3>
<p>You will create a class called Jumper.	This actor can move forward two cells in each move. It “jumps” over rocks and flowers. It does not leave anything behind it when it jumps.</p>
<p>Before you get going, you need to figure out how you will address the following situations:</p>
<ol>
<li>What will a jumper do if the location in front of it is empty, but the location two cells in front contains a flower or a rock?</li>
<li>What will a jumper do if the location two cells in front of the jumper is out of the grid?</li>
<li>What will a jumper do if it is facing an edge of the grid?</li>
<li>What will a jumper do if another actor (not a flower or a rock) is in the cell that is two cells in front of the jumper?</li>
<li>What will a jumper do if it encounters another jumper in its path?</li>
<li>Are there any other tests the jumper needs to make?</li>
</ol>
<h3>Design</h3>
<p>Several design decisions need to be considered:</p>
<ol>
<li>Which class should Jumper extend?</li>
<li>Is there an existing class that is similar to the Jumper class?</li>
<li>Should there be a constructor? If yes, what parameters should be specified for the constructor?</li>
<li>Which methods should be overridden?</li>
<li>What methods, if any, should be added?</li>
<li>What is the plan for testing the class?</li>
</ol>
<h3>Code</h3>
<p>Implement the Jumper and JumperRunner classes.</p>
<h3>Test</h3>
<p>Carry out the test plan to verify that the Jumper class meets the requirements.  This will involve putting an instance of your Jumper class into all the situations outlined in the requirements as special cases.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garfieldcs.com/2010/03/jumper-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

