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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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 47 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply