Question: 3 1 . 4 1 Ch . 1 4 : Name Bins ( Multiple Arrays, loops ) You are tasked with the job of scanning

31.41 Ch.14: Name Bins (Multiple Arrays, loops)
You are tasked with the job of scanning names and putting them in bins by their first letter.
You will only need to bin names starting with 'A','B','C','D'
If the user gives you a name that doesn't start with the above letter, prompt for a different name.
No names will start with lower case letters.
The first name you see starting with A should go into ANames at index 0. The second A name at index 1. The third at 2, etc.
The first name you see starting with B should go into BNames at index 0. The second B name at index 1. The third at 2, etc.
The first name you see starting with C should go into CNames at index 0. The second C name at index 1. The third at 2, etc.
The first name you see starting with D should go into DNames at index 0. The second D name at index 1. The third at 2, etc.
No test cases will have more than 5 names per bin.
The arrays have already been created for you.
You should use a switch statement for this exercise.
When you finish binning, call printBins() with you four arrays as input.

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!