5.5 Array Exercises

advertisement

5.5 Array Exercises

1. Create a program that allows a user to enter the heights of 10 members of the basketball team (in cm). Your program should then display the average, highest and lowest of these heights with appropriate labels. 2. Design a program that will accept number values for the day of the week and the month of the year (e.g. 15 entered in a day text box, 3 entered in a month text box) and the program would display the equivalent in text format (i.e. March fifteenth). 3. Write a program that simulates the rolling of two, six-sided dice. The program should keep tallies of and display the frequency that each of the possible totals is obtained. 4. Create a program that allows a user to type a sentence which is then processed by the program to output the words of the sentence in alphabetical order (using the Bubble sort method of course!) 5. Design a mini-language translator. Store 25 commonly used words into an 'english' array and their french equivalents into a second array. Allow the user to select or type in one and then see the equivalent in the other language. 6. Create an address book program. It should allow a user to enter a maximum of 25 friends' names, phone numbers, and addresses. Each set of information should be stored in their own array. Give the user the option to sort the information based on either the names, phone numbers, or addresses, making sure the corresponding information in the other two arrays get changed accordingly.

Download