CITP 3310 XXXXXXXXXXSurvey of Programming Languages XXXXXXXXXXLab 12
Lab 12 – Reference Parameters
In this lab you will continue to practice writing functions. In addition to writing functions with value
parameters (as you did in the previous lab), you will write functions with reference parameters. You will
use reference parameters to pass more than one value back to the calling function.
Your Program
You will complete a program that calculates a contestant's score based on the scores from five judges.
The highest and lowest of the judges' scores are thrown out, and the contestant's score is the average of
the remaining three judges' scores.
I have already written the main function for you, and the function to get user input (provided in the
AverageScore.cs file). You should not make any modifications to the Main function, or to the
getDouble0to10 function. You will write two additional functions, as specified in the comments in the
file. Note that the functions you write must match the calls to those functions from the main program.
You may not use global variables. You will turn in the completed .cs file.
The output from your program should look similar to the sample output below.
Challenge
For the challenge this week, put the two methods you must write in a separate class, instead of defining
them as static methods in the AverageScore class. This will require you to modify the Main function a
little bit, in order to grant access to those methods.
Sample Output
CITP 3310 XXXXXXXXXXSurvey of Programming Languages XXXXXXXXXXLab 12