Question: In Java, write a GUI-based program that analyzes a round of golf. You will retrieve the data for 18 holes from a text file. On
In Java, write a GUI-based program that analyzes a round of golf. You will retrieve the data for 18 holes from a text file. On each lne in the file will be the par for that(which is 3, 4, or 5) and your score for that hole. Your program should read the file and display a combo box listing the 18 holes. When the user selects a hole, the score for that hole should be displayed in a label. Provide buttons for all the following
-One button,when clicked, displays whether your overall score was over par, under par, or par.
-Another button, when clicke, displays the number of holes for which you made par.
-Another buttonm when clicked, displays how many birdies you scored ( a birdie on a hole is 1 under par)
For this, you should design and code a seperate (non-GUI) class encapsulating the analysis, then instantiate an object of that class inside your GUI class and call the variousmethods as needed.
**This program only needs one .txt docuement with two with two columns of 18 numbers**
Ex.
1 2
3 4
5 6
6 7
4 5
3 4
5 3
2 6
1 2
2 3
and etc...
The first being the par of the hole while the second number in the row being your score you shot for that whole.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
