The second phase of the Duck Hunting project has been a resounding success. With Logan's supervision, the coding of the Johns, Joe, Zach, James, Chris, and Matt, and Felix's images, the result is excellent.
The headline link leads to a page generated by Greenfoot's export to web page function. That function converts the code to an applet, a program that runs in a web browser. The user's computer gets the code from the server and runs it. My first efforts playing the game as an applet lead to the following observations.
Here's the current Wombat code I'm working with in class. Use this file to add comments to the first 15 lines OF CODE (about to line 27). Be sure each comment shows that you understand what the line of code does. Obviously this code is based heavily on (i.e. it's the same as -- with a few tiny changes) the original Wombat class distributed in the Wombat scenario in Greenfoot.
Some people have asked if I could assign some extra credit. The following JavaBat problems may be done for 6 points of extra credit each. The later the problem is in the list, the harder it probably is. Get the easier points first.
Set one. Do as many of these as you'd like; the ones you choose to do must be done
by Monday morning, January 18 when I will check these.
Logic-2 Problems: makeBricks loneSum luckySum noTeenSum roundSum closeFar
blackjack evenlySpaced makeChocolate
String-1 Problems (consult the Java API for methods of the String class that might be
useful): endsLy nTwice twoChar middleThree hasBad atFirst
lastChars conCat lastTwo seeColor frontAgain minCat extraFront without2
deFront startWord withoutX withoutX2
Set two. Do as many of the Array-1 problems as you'd like; the ones you choose to do must be done by Tuesday morning, January 27 when I will check these.
The following JavaBat problems will be due this week. All are from Logic 1 unless otherwise specified.
In addition, it would be smart to continue looking at Greenfoot scenarios that present you with some good code to build on when you create "Dodge the Dean".
As we progress with our latest Elevator incarnation, it's worthwhile thinking about how exciting elevators can really be. Perhaps in the future we can extend the Passenger class to create subclasses such as Human and Vampire and Werewolf.
Now that we're drawing to the close of our first unit -- JKarel the Robot -- it's time to take a step back and consider what the essential lessons are.
During the year I'll use this page to keep you up to date on what's transpiring in our Java course. I'll add useful resources and commentary on what's essential to gain from each of the chapters in Head First Java (2nd edition). Homework assignments for the past few days and next few days will be in the panel on the left. The panel on the right will contain useful links to outside resources that will help you learn to program in Java.
Bookmark this page so you can quickly access it during the school year.
| Material | Use |
|---|---|
| flash drive (usb, 1 GB is plenty) | backups of all course files |
| Head First Java , 2nd edition | Explanations, sample code, website tools |
| notebook: 3 ring binder, 2" thickness minimum, with 2 dividers | Storing notes and handouts |
| Date | Reading Due | Assignments Due |
|---|