Question: * * JAVA please * * * Project 1 Mini Golf Score Stats Write a program that will analyze the results for the scorecard of
JAVA please Project Mini Golf Score Stats
Write a program that will analyze the results for the scorecard of a miniature golf game.
A mini golf course usually has holes, and is played by players. Points for any single hole can be
anywhere from to The best score for a hole is holeinone And the worst score for a hole is
Your program will read the scores from a file containing data for players and identify the best score
lowest points worst score highest points and the total for each player.
General requirements
Your program should have multiple functions, at least different functions
a The main function should control the overall program, displaying a menu with options
for the user.
i The main program should allow the user to read a file and find information on
the players multiple times.
b At least one function that defines parameters.
c At least one function that returns a value.
d At least one function that accepts arrays as parameters.
Your program should use loops.
a At least one conditional loop while or dowhile
b At least one standard for loop
c At least one conditional loop with a sentinel value while or dowhile
d You may use other loops, for instance a foreach enhanced for loop
Your program should have conditions.
a if else
b either ifelse if or switchcase statement for multiple decisions
Use style and conventions as shown in class, using style or conventions not seen in class may
cause you to not get credit.
a Use lower camel case convention for naming your identifiers.
b Choose descriptive names for variables and methods.
c Avoid using literals, for example if your array is of size you should create a constant
variable. For example declare public static final MAXSIZE and then use MAXSIZE
throughout your program. Do not have code like int instead have code like
intMAXSIZEYou may need or more constants in your program.
d Indent your code and use white space as recommended to make your code easy to
read.
e Include comments in your code to describe what each method does and other
important conceptsparts in your methods.
Specific requirements
Your program should read the mini golf score card for a group of players and store it using
arrays. Hint: This functionality fits well within a method.
a Ask the user for the name of the file that contains the scorecard information.
i If the file does not exist, display an error for the user to let them know the file is
not found, and allow the user to enter a new name.
ii Repeat the process until the user enters a valid filename.
b A scorecard file should have between and players.
c The data in the scorecard is a csv comma separated value file with the following fields:
Name, ptshole ptshole ptshole ptshole
d Read the data, and store it in two arrays:
i A onedimensional array, nameArray should store the names of the player.
ii A twodimensional array, scoreArray should store the points for every hole for
every player.
iii. nameArray and scoreArray are parallel arrays, ie The points in the scoreArray
at index are for the player at index the points for player at index in
nameArray are at index in the scoreArray, etc.
nameArray scoreArray
John
Susan
Lauren
Michael
After data is read from the file, the user should have the following options:
Hint: This is another great fit for a method. You may also use and call additional methods to
find the players and display the user data.
a Find the player with the least points first place
b Find the player with the most points last place
c Display the total points and the average points per hole for each player.
Write a new file that contains all the original information, plus the total and average points for
each player. Hint: Also makes for a useful method
Name, ptshole ptshole ptshole ptshole totalpts avgpts
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
