Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860
Old MacDonald Had A Farm. - Huben's Wiki

Old MacDonald Had A Farm.

From Huben's Wiki
Jump to: navigation, search
 
Line 1: Line 1:
 
You may be wondering why, here in Starfleet Academy, we are studying farms.  Allow me to remind you that [[http://en.wikipedia.org/wiki/James_Kirk James Tiberius Kirk]] grew up on a farm in Iowa.
 
You may be wondering why, here in Starfleet Academy, we are studying farms.  Allow me to remind you that [[http://en.wikipedia.org/wiki/James_Kirk James Tiberius Kirk]] grew up on a farm in Iowa.
  
Make a new folder, named "Farm".  Download these two files into it:
+
Download these two files:
* [http://dl.dropbox.com/u/20086520/AP%20Comp%20Sci/CH11/McDonald/Animal.class Animal.class]
+
* [http://dl.dropbox.com/u/20086520/AP%20Comp%20Sci/CH11/McDonald/Animal.java Animal.java]
 
* [http://dl.dropbox.com/u/20086520/AP%20Comp%20Sci/CH11/McDonald/TestAnimal.java TestAnimal.java]
 
* [http://dl.dropbox.com/u/20086520/AP%20Comp%20Sci/CH11/McDonald/TestAnimal.java TestAnimal.java]
Then load the two files into DrJava.
+
into a new folder, and then load them into DrJava.
  
Instructions are in TestAnimal.Java.  When you are successful, the program will inform you.  At that point, you can uncomment the "Animal.song();" line, and you should get a correct rendition of the song.  When you know how to make your computer read the song, we can put the instructions here.
+
Don't look at Animal.java or change anything in it.  Just look at TestAnimal.java.
  
Reading the song on Macs:
+
The instructions are in TestAnimal.java:
 +
* You will need a class for each type of animal.  You should then be able to compile and run.
 +
* Make a constructor for each animal class, and call setNoise() in the constructor.  Cow() should have setNoise("moo");
 +
* You will need some classes for grouping animals together.  For example, Duck and Chicken will extend a grouping class because they use the same methods.
 +
** Make a diagram of the hierarchy of Animal, the grouping classes, and your farm animals.
 +
** Create the grouping classes.
 +
** Fix the classes of each type of animal to extend from the grouping classes.
 +
* Override methods eats(), babyfood(), and coat() from the parent classes as high up in the hierarchy as you can.   
  
Reading the song on PCs:
+
When you are successful, the program will inform you.  At that point, you can uncomment the "Animal.song();" line, and you should get a correct rendition of the song. 
 +
 
 +
* Reading the song on Macs:
 +
** Put the text you want read into TextEdit. 
 +
** Select the text.
 +
** Use the menu option Edit/Speech/Start Speaking.
 +
** If you open the System Preferences/Speech menu, you can change the voice and the rate.
 +
 
 +
* Reading the song on PCs:
 +
** Use Microsoft Narrator by clicking control-escape then R to bring up the run window and then type narrator and hit enter.
 +
** In the narrator window, uncheck everything except "read Typed Text"
 +
** Then paste your song into a new notepad document, and it will be read aloud.

Latest revision as of 14:14, 25 January 2013

Personal tools
translate