Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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. This requires you ask ask the user for the day of the month they were born. 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: 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 Roman ToDecimal 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 import java.util.*; public class Test { public static void main(String[] args) { Scanner in = new Scanner (System.in); Program 1 month were you born? (1-12) "); // program 1 System.out.println(" System.out.print("What int Month= in.nextInt(0); System.out.print("What int Day = in.nextInt(); day of the month were you born? "); System.out.println("Your birthstone is " + Birthstone(Month)); } static String Birthstone(int Month) { String[] Stones = {""", "garnet", "amethyst", "aquamarine"}; return Stones[Month]; } static String ZodiacSign(int Month, int Day) { } if (Month == 3 && Day>= 21) || (Month==4 && Day // program 2 System.out.println("~~~~ Program 2 char[][] world = new char[10][10]; // initialize world to periods for (int y=0; y
Step by Step Solution
★★★★★
3.36 Rating (149 Votes )
There are 3 Steps involved in it
Step: 1
java import javautilScanner public class sign public static void mainString args ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started