Question
Write a program to process golf scores. The scores of four golfers are stored in the golf.txt file. Each line represents one hole, and the
Write a program to process golf scores. The scores of four golfers are stored in the golf.txt file. Each line represents one hole, and the file contains 18 lines. Each line contains five values: par for the hole followed by the number of strokes each golfer used on that hole. Store the totals for par and the players in an ArrayList. Determine the winner and produce a table showing how well each golfer did (compared to par)
Golf.txt
3_ 3 4 3 3 4 _4 6 5 6 4_ 6 4 4 5 4_ 7 5 6 6 3_ 4 3 4 4 4_ 6 5 5 6 5 _7 5 7 6 4 _5 6 5 4 4 _5 4 6 7 5 _6 6 6 6 3 _3 5 4 3 4 _5 4 4 4 5 _6 7 6 5 4 _5 4 4 6 4 _5 5 7 4 5 _5 4 5 6 4 _4 4 4 5 4 _6 5 5 5
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started