Skip to the content of the web site.

Project L.1: Round-robin tournament

Write a program to do the following:

  1. Query the user for the number of teams to play in a round-robin tournament.
  2. Ask for a name for each of the teams and ensure that each name is unique.
  3. List all the games to be played, and give each game a unique identifying number.
  4. Allow the user to identify the game being played and the result. Once all results are in, continue by printing the next set of games to be played.
  5. Continue until the required games of a round-robin tournament are satisfied and then calculate a winner.

You can read about a round-robin tournament at Wikipedia.

Modification

Store information in a text file so that the information is preserved even if the program is terminated. Then, when the program is started again, allow a command-line argument to be the file containing information to be read in.