Program4-Hints

# Program4-Hints - i. type int. ii. should be 1 dimensional,...

This preview shows pages 1–2. Sign up to view the full content.

COP 3223 Program #4 Hints 1. Data Structures (arrays for this program) Use the following data structures: A. An array to store all the contestant’s scores. i. type int ii. should be 2 dimensional, of size MAX_CONTESTANTS x MAX_JUDGES iii. index [i][j] should store contestant i’s score from judge j. (contestant and judge numbers start from 0) B. An array to store all the judge’s averages. i. type double ii. should be 1 dimensional, of size MAX_JUDGES iii. index i should store judge i’s average score. (judge numbers start from 0) C. An array to store all the judge’s standard deviations. i. type double ii. should be 1 dimensional, of size MAX_JUDGES iii. index i should store judge i’s standard deviation. (judge numbers start from 0) D. This array is optional. It’s an array to store the numbers of all bad judges.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: i. type int. ii. should be 1 dimensional, of size MAX_JUDGES iii. index i should store the number of the ith bad judge. For example, if the bad judges were 0, 3, 4, and 7, then index 2 of this array would store 4. 2. Basic Algorithm A. Open the file and read in the number of cases. B. Loop through each case i. Read in all of the scores from the file ii. Calculate the average score of each judge iii. Calculate the standard deviation of each judge iv. Go through judges again and store which ones were bad. v. Go through each contestant to score them, ignoring bad judges’ scores. i. If this contestant has a higher score than the previous a. Update the highest score b. Update the contestant number vi. Output the results for this contest....
View Full Document

## This note was uploaded on 06/09/2011 for the course COP 3223 taught by Professor Guha during the Spring '08 term at University of Central Florida.

### Page1 / 2

Program4-Hints - i. type int. ii. should be 1 dimensional,...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online