Design a GUI program to find the weighted average of four test scores. The four test scores and their respective weights are given in the following format:
testscore1 weight1
...
For example, the sample data is as follows:
75 0.20
95 0.35
85 0.15
65 0.30
The user is supposed to enter the data and press a Calculate button. The program must display the weighted average.
Remember to follow proper form and design in your response.
Write a method, reverseDigit, that takes an integer as a parameter and returns the number with its digits reversed. For example, the value of reverseDigit(12345) is 54321. Also, write a program to test your method.