Copy source code and example output for the programs into a single Word document.  Please use Courier New font.  Submit the file on eCampus under the "Submit Homework" menu option.
 

1. Create a program named sign.java.  Ask the user which month and day they were born.  Output their birthstone and zodiac sign.  You should have these two methods in your program:
 
String Birthstone(int Month)

String ZodiacSign(int Month, int Day)

Example output:
What month were you born (1-12)? 5
What day of the month were you born? 28

Your birthstone is Emerald.
Your zodiac sign is Gemini.


Extra Credit
:  Include the Chinese zodiac animal.


2.
Create a program named board.java.  Create a 10x10 two dimensional array of characters.  Fill all 100 elements with a period.  Next, fill ten random elements with a dollar sign.  Place your last name initial in a random location.  Output the array using a nested for loop in this format:

. . . $ . . . . . .
. . . . . . . . . .
. . . $ . . . . . .
. . . . . . . . $ .
. . K . . . . . . $
. . . . . $ . . . .
. $ . . . . . . . .
. . . . . . $ . . .
. . . . . . . . . $

. $ $ . . . . . . .
 

3. Create a program named roman.java.  Ask the user to enter a Roman Numeral.  Output the numeric value of the Roman Numeral.  You should have the following method in your program:  int RomanToDecimal(String R)

Here's some numbers to test your program with:  MCMXLII = 1942, MCMLXIX = 1969, DCCCLXXXVIII = 888

Hint: In the RomanToDecimal method, create a for loop that steps through each character of roman numeral. 

M = 1000, D = 500, C = 100, L = 50, X = 10, V = 5, I = 1.  
MDCLXVI = 1000 + 500 + 100 + 50 + 10 + 5 + 1 = 1666

If a digit is out of order, then it is subtracted from the next digit.  This is only used for these combinations:
CM = 900, CD = 400, XC = 90, XL = 40, IX = 9, IV = 4



Extra Credit Program
Write a program named roll.java that simulates rolling a pair of dice 10,000 times.  It should track how many times each number (total of dice 2 - 12) is rolled. 

Total On Dice    Number of Rolls
-------------    ---------------
       2              274
       3              520
       .               .
       .               .
       .               .
       12             281

Hint: Create a 13 element int arrary to store the number of rolls of each value 2 - 12.

Create a loop that executes 10,000 times.

Inside the loop, pick 2 random numbers 1-6.  Add the 2 numbers and increment to corresponding array element.

After the main loop, output the values of array elements 2 - 12.