Directions

This exercise requires designing a program which solves the problem described in the problem statement below. Provide comments in your pseudo-code and Java code as necessary.

Your solution (identification headers) must include these components:

1.Flowchart
2.Pseudo-code
3.Program Coded
4.Program Output

Problem Statement

A golf club has a small tournament consisting of five golfers every weekend. The club president has asked you to design a program that does the following:

  • Reads player's names and their scores from the keyboard for each of the five golfers and writes them to a file called golf.dat. Entering "Z" for the player name will end user input.
  • Reads the contents of golf.dat and displays contents.

Expected Input/Output

Your results should be similar to the following:

Enter player Name (Z to terminate): Tiger Woods
Enter score: 72
Enter Player Name (Z to terminate): Rory McElroy
Enter Score: 70
Enter player name (Z to terminate): Dustin Johnson
Enter score: 67
Enter player name (Z to terminate): Patrick Reed
Enter score: 69
Enter player name (Z to terminate): Jim Furyk
Enter score: 71
Enter player name (Z to terminate): Z


Player: Tiger Woods Score: 72
Player: Rory McElroy Score: 70
Player: Dustin Johnson Score: 67
Player: Patrick Reed Score: 69
Player: Jim Furyk Score: 71
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.