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
Entering Starfleet Academy - Huben's Wiki

Entering Starfleet Academy

From Huben's Wiki
Jump to: navigation, search
(Investigating Your Tricorder)
 
Line 50: Line 50:
  
 
== Investigating Your Tricorder ==
 
== Investigating Your Tricorder ==
* The first rule of investigating your Tricorder is to not activate the Corbamite Device.
+
* The first rule of investigating your Tricorder is to not activate the [http://en.wikipedia.org/wiki/Corbomite Corbomite Device].
 
* See that teeny little window?  Make it bigger.  What did you change?
 
* See that teeny little window?  Make it bigger.  What did you change?
* Coodinates in your tricorder are all first quadrant, but with a twist.  Discover the twist.  What is it?
+
* The x and y coodinates in your tricorder are all first quadrant, but with a twist.  Discover the twist.  What is it?
 
* That delicate little rectangle can also be changed.  How do you change its size and location?  Look [http://docs.oracle.com/javase/6/docs/api/java/awt/Color.html here to see how to change the Color.]
 
* That delicate little rectangle can also be changed.  How do you change its size and location?  Look [http://docs.oracle.com/javase/6/docs/api/java/awt/Color.html here to see how to change the Color.]
  
Line 67: Line 67:
  
 
== Challenges! ==
 
== Challenges! ==
from concentric
+
* In a Fibonacci sequence, each term is the sum of the previous two terms.  That's recursion: to find a term, we find the preceding two terms and add them.  That breaks the problem into two simpler parts, calling itself to calculate each of the simpler parts.  In algebra, we say fib(n) = fib(n-1) + fib(n-2).  So when do we stop?  We are told fib(1) = 1 and fib(0) = 0.  The sequence is 0, 1, 1, 2, 3, 5, 8, 13....
spacing
+
** Write a class Fibonacci with a main() that prints fib(6).
colors
+
** Write a method '''public static int fib(int n)'''.  That method should return 1 if n is 1, and 0 if n is 0.  Otherwise, it should return the sum of the preceding two Fibonacci numbers.
fibonacci
+
* Change the spacing of the rectangles so that they are closer or further apart.
 +
* The rectangle shrink concentrically.  Make them shrink eccentrically, to one corner or another.
 +
* Can you make the rectangles change color as they shrink?

Latest revision as of 12:13, 25 October 2012

translate