Answered step by step
Verified Expert Solution
Question
1 Approved Answer
e Assignment Submission / D Project 1.pdf xC Home | Chegg.comx d file:///C/Users/Latitude%20E5510/Downloads/Project%201.pdf You are to modify the program you wrote for CSC 135, Program
e Assignment Submission / D Project 1.pdf xC Home | Chegg.comx d file:///C/Users/Latitude%20E5510/Downloads/Project%201.pdf You are to modify the program you wrote for CSC 135, Program #6 (Arrays) to make use of 2D (two dimensional) arrays. In Program #6, you read the number of toys per elf using a data file called elves.dat and placed the values in two parallel arrays. You created a third parallel array of strings to record a rating for cach elf. For this program, you are going to create a 2D array containing the number of toys and corresponding ratings. The rating will be a number from 0 to 5 instead of number of stars, based on the table below: Ratings: s Ma between 300 and 499 between 200 and 299 under 200 The program should read into the arrays. It should look at the number of toys made by each elf and record this number, along with a rating in the 2D array. The elf s name will still go into a parallel array You will add the ability for the user to search for a particular elf. The program should ask the user for an elf name, and should print the number of toys and rating for that elf As in the previous program, the program should then print out the arrays side by side in neat, labeled columns. For this program, the output should be printed in descending order by number of toys made. So, the first elf listed should be the one that made the most toys. It should still display the total number of toys made by the elves and the number of elves who made more than 500 toys. Since the elves are printed in order by the number of toys made, it is no longer necessary to print the name of the elf who made the most toys or the name of the elf who made the least toys. The program should also calculate and print the average number of toys made by the elves. The goal of this program is to determine the impact of changing from 3 parallel arrays to 2 parallel arrays - where one array is now 2D O Type here to search 12:25 PM rP ^ 41)) 2/22/2013 e Assignment Submission / D Project 1.pdf xC Home | Chegg.comx d file:///C/Users/Latitude%20E5510/Downloads/Project%201.pdf You are to modify the program you wrote for CSC 135, Program #6 (Arrays) to make use of 2D (two dimensional) arrays. In Program #6, you read the number of toys per elf using a data file called elves.dat and placed the values in two parallel arrays. You created a third parallel array of strings to record a rating for cach elf. For this program, you are going to create a 2D array containing the number of toys and corresponding ratings. The rating will be a number from 0 to 5 instead of number of stars, based on the table below: Ratings: s Ma between 300 and 499 between 200 and 299 under 200 The program should read into the arrays. It should look at the number of toys made by each elf and record this number, along with a rating in the 2D array. The elf s name will still go into a parallel array You will add the ability for the user to search for a particular elf. The program should ask the user for an elf name, and should print the number of toys and rating for that elf As in the previous program, the program should then print out the arrays side by side in neat, labeled columns. For this program, the output should be printed in descending order by number of toys made. So, the first elf listed should be the one that made the most toys. It should still display the total number of toys made by the elves and the number of elves who made more than 500 toys. Since the elves are printed in order by the number of toys made, it is no longer necessary to print the name of the elf who made the most toys or the name of the elf who made the least toys. The program should also calculate and print the average number of toys made by the elves. The goal of this program is to determine the impact of changing from 3 parallel arrays to 2 parallel arrays - where one array is now 2D O Type here to search 12:25 PM rP ^ 41)) 2/22/2013
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started