I am doing an assignment that requires me to create a GUI for input of scores. I have to then take those scores, remove the MIN and MAX value and average the scores. How do I find the MIN and MAX scores and then remove them from the array?
iaRun1[0] = Integer.parseInt(judgeOneRunOne.getText());
iaRun1[1] = Integer.parseInt(judgeTwoRunOne.getText());
iaRun1[2] = Integer.parseInt(judgeThreeRunOne.getText());
iaRun1[3] = Integer.parseInt(judgeFourRunOne.getText());
iaRun1[4] = Integer.parseInt(judgeFiveRunOne.getText());
iaRun1[5] = Integer.parseInt(judgeSixRunOne.getText());
iaRun2[0] = Integer.parseInt(judgeOneRunTwo.getText());
iaRun2[1] = Integer.parseInt(judgeTwoRunTwo.getText());
iaRun2[2] = Integer.parseInt(judgeThreeRunTwo.getText());
iaRun2[3] = Integer.parseInt(judgeFourRunTwo.getText());
iaRun2[4] = Integer.parseInt(judgeFiveRunTwo.getText());
iaRun2[5] = Integer.parseInt(judgeSixRunTwo.getText());
//How do I get MIN and MAX values and delete them?
// The average for run 1
for (int i = 0; i < iaRun1.size(); i++) {
dTotal1 += iaRun1.get(i);
dAvg1 = dTotal1 / iaRun1.size();
}
// The average for run 2
for (int j = 0; j < iaRun2.size(); j++) {
dTotal2 += iaRun2.get(j);
dAvg2 = dTotal2 / iaRun2.size();
}