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_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
Hogwarts School Of Computer Science - Huben's Wiki

Hogwarts School Of Computer Science

From Huben's Wiki
Jump to: navigation, search
Line 87: Line 87:
  
 
Now we play with it.
 
Now we play with it.
* Look for numbers, and try to chnage them to make it run differently.  You will need to compile and run to see your changes.
+
* Look for numbers, and try to change them to make it run differently.  You will need to compile and run to see your changes.
 
* What numbers do what?
 
* What numbers do what?
 
* Bonus if you can find how to make it hop instead of smooth scrolling.
 
* Bonus if you can find how to make it hop instead of smooth scrolling.
Line 138: Line 138:
 
This incantation has not followed the rules of the curly braces, but will still work.
 
This incantation has not followed the rules of the curly braces, but will still work.
  
* Cut and paste it into Dr. Java, and save it.
+
* Cut and paste it into Dr. Java, and save it as HelloGraphics.
 
* Run it: it should work.
 
* Run it: it should work.
 
* Now indent it properly so that it looks like Banner.java above.
 
* Now indent it properly so that it looks like Banner.java above.
Line 144: Line 144:
 
* What does that tell us about spaces in these incantations?
 
* What does that tell us about spaces in these incantations?
 
* Why then do we indent according to curly braces?
 
* Why then do we indent according to curly braces?
 +
 +
Let's do it the easy way now!
 +
 +
* Cut and paste it again into Dr. Java, so there is no indentation.
 +
* Select all the code.
 +
* Press the Tab key.  What magic has resulted?
 +
* If you have time, you can play with this program too.

Revision as of 11:27, 1 September 2013

Personal tools
translate