Question: Assignment 5B: What's your sign? We can use 2D arrays as a kind of look-up table. This means we can fill it with information,

Assignment 5B: What's your sign? We can use 2D arrays as a

Assignment 5B: What's your sign? We can use 2D arrays as a kind of look-up table". This means we can fill it with information, and quickly access relevant data using the index numbers. First, you will create a 2D String array - the rows will represent the 12 months of the year, and the columns will represent the days of each month (you may either use 31 days as the boundary for each row, or use ragged arrays). You will fill each cell with the appropriate Zodiac sign, using the ranges shown here: https://www.britannica.com/topic/zodiac For example, 10/14 would be "Libra". You will then prompt the user to enter their day and month of birth using integers (e.g. October is 10). You will use these values as indexes to get the correct sign from the 2D array. Make sure to check if the input would be outside the range of the array. You must use a 2D array for this assignment; you will not earn points if you do not use a 2D array. Sample Output #1: [What's your sign?] What month were you born in? 11 And what day? 24 Your sign is Sagittarius! Sample Output #2: [What's your sign?] What month were you born in? 32 That is not a valid month... Sample Output #3: [What's your sign?] What month were you born in? 11 And what day? -32 That is not a valid day...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!