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
The Mind Of Sauron - Huben's Wiki

The Mind Of Sauron

From Huben's Wiki
Jump to: navigation, search
(Created page with "Project Simulate Sauron We are going to write a sizable class, but it will not need to compile. The goal is to get the variable and method declarations right. When writing var...")
 
Line 18: Line 18:
 
* http://en.wikipedia.org/wiki/Sauron
 
* http://en.wikipedia.org/wiki/Sauron
 
* Be creative!
 
* Be creative!
* You may assist each other, or make small groups.  Be sure to put a comment at the top saying who takes credit for the code and who assisted you.
+
* You may assist each other, or work in pairs.  Be sure to put a comment at the top saying who takes credit for the code and who assisted you.
  
 
Write a class named Sauron with the following fields and methods:
 
Write a class named Sauron with the following fields and methods:
* The number of Orcs in his army.  (Not initialized.)
+
* Fields:
* The year of Sauron's final defeat.
+
** The number of Orcs in his army.  (Make a guess.)
* The flow rate of the lava in Mount Doom.  (Not initialized.)
+
** The number of Uruk-Hais in his army.  (Make a guess.)
* An angle of view of the eye in radians, initialized to pi/16.  Use the Math class.
+
** How many Hobbits it takes to feed an Orc one day (you can feed an Orc five days on a Hobbit.)
* An array of RingWraiths (another class we will not write today) -- name it what you will.  (Not initialized.)
+
** How many Hobbits it takes to feed an Uruk-Hai one day (you can feed an Uruk-Hai three days on a Hobbit.)
* An array of some of his titles.
+
** An array of three words of a spell.
* A method printing an evil cackle.
+
* Methods:
* A method dispatching a number of ringwraiths to a location name.
+
** A method printing an evil cackle.
 +
** A method dispatching a number of ringwraiths to a location name.

Revision as of 10:09, 25 September 2013

translate