CS 230 Fall 2009                                               

Assignment 11 – Arrays (and what went before) --  Extreme Photoshopping with the Stars!

100 Assignment Points

 

Assigned: 11/23/2009

Due: 12/07/2009 at the start of class  This includes two labs. However, if you leave campus before the lab on 11/24, that is not an excuse for a late program.

 

Pre-Lab (Do Before Lab):  Bring materials – a way to save a copy for you and a copy to turn in. Read through the whole assignment; hints and details are spelled out throughout. Plan out tasks, objects, and events needed for program.  Plan out major  pseudocode.

 

Main Assignment Description:

The LSUNBC TV network is planning a new TV show in which a celebrity and a regular person work together to ‘photoshop’ a picture of the star to make them look better. Each team will be judged by a panel of up to 10 judges. LSUNBC needs a program to calculate the contestants’ scores during the show. The program first obtains from the user via the GUI the name of the contestant, then reads the contestant’s scores from the file named contestantname.txt (i.e. if the contestant’s name is ‘wilson’, the scores will be in a file named ‘wilson.txt’). If any line of the file includes invalid data (non-numeric, not a whole number, or outside the allowable range (0-10)), then a message should be displayed and no results be displayed. Valid scores should be put into an array, since we will need to go back and revisit those scores. Then, for the current contestant, the final score should be calculated as a form of “Middle mean” in which the average of scores other than the highest score and the lowest score is the result. Finally, if all inputs are ok, then the program should display all judges scores from highest to lowest (in a rich text box), the high score, the low score, the total of the values used (i.e. without the max and min), and the middle mean. 

Provide the capability to:

·         Score a contestant

·         clear (input and outputs)

·         exit

Please set the name of the project to something other than the default name (WindowsApplication1, …). It is helpful if you use a name that identifies you as well as the assignment (e.g. yourlastname assignment 11).

 

Background Knowledge:

·         Judges rating should be whole numbers

·         No knowledge of Photoshopping, TV shows, celebrities, etc is needed except as given here.

·         To help make clear the idea of the middle mean, an example:

o    Scores: 5,6,7,8,9,3,5,6,8,7

o    Ordered Scores: 9  8  8  7  7  6  6  5  5  3

o    Max: 9

o    Min: 3

o    Total without max and min: 52

o    Middle Mean: 6.5

Task Details:

DO pass the array  (and number of values) to any independent procedures or functions that need it.

 

Miscellaneous:

 

Hand in: