So I'm trying to build this program for class and the teacher didn't really show us how to do it and is leaving it up to us to figure it out. The directions are as follows:
The program will input the divers name, the scores of the 5 judges, and the degree of difficulty as well select the city the diver is from. Each diver receives a score (0-10) from 5 judges. Dives have different degrees of difficulty ranging from 1.00 to 1.67. When the process diver button is clicked, the program will validate the data. Ensure that a name has been entered and a city has been selected. If not, display and error message box and set the focus back to that field using the requestFocus method. If everything is valid, calculate the diver's score. The diver's score is calculated as follows: all five scores are added. The highest and lowest scores are always assumed to be skewed, or innaccurate, so they are dropped. Divide the resulting score by 3 and multiply that by the degree of difficulty. Add 1 to the number of divers. Count how many dovers are from Dallas, Fort Worth, or other. Determine the top diver -- the one with the highest score. Clear the text fields, unselect the city, and set the focus to the name field using the requestFocus method.
I can do everything except the last part. thats highlighted in red. I don't know how to store the data when the previous data was cleared. Do I have to store the information in a cache or what? I'm not asking for the whole thing to be coded, I just need help knowing what I am supposed to do to get the last part to work.