Page 1 of 1

Switch statements. In Zodiac.java, write a program that reads in a number from 1-12. Pass that value to the function get

Posted: Mon Jun 06, 2022 1:11 pm
by answerhappygod
Switch Statements In Zodiac Java Write A Program That Reads In A Number From 1 12 Pass That Value To The Function Get 1
Switch Statements In Zodiac Java Write A Program That Reads In A Number From 1 12 Pass That Value To The Function Get 1 (45.05 KiB) Viewed 49 times
Can i have the java code
Switch statements. In Zodiac.java, write a program that reads in a number from 1-12. Pass that value to the function getZodiacName. Then use a switch statement to return the zodiac name corresponding to the number as a String. The western zodiac has 12 signs. While this isn't important, the first sign starts on March 21st with the Spring equinox, which was the beginning of the Persian New Year. The signs are:< E 1. Aries 2. Taurus 3. Gemini 4. Cancer 5. Leo 6. Virgo 7. Libra 8. Scorpio 9. Sagittarius 10. Capricorn 11. Aquarius 12. Pisces The result of get ZodiacName should be null if the number passed is not between 1 and 12 (inclusive), in which case the statement System.out.println("Invalid zodiac number"); should be printed www