In this assignment you will practice using C++ classes as you parse and compute statistics from the results of Grand Slam tennis championships (the Australian Open, the French Open, Wimbledon, and the U.S. Open).

computer science

Description

In this assignment you will practice using C++ classes as you parse and compute statistics from the results of Grand Slam tennis championships (the Australian Open, the French Open, Wimbledon, and the U.S. Open). Please carefully read the entire assignment before beginning your implementation. Here’s a crash course in tennis scoring: A match between two players consists of a number of sets. For men’s Grand Slam events, the first player to win three sets is the winner of the match (a.k.a., the best of five). Each set in the match consists of a number of games. The first player to win six games is the winner of the set, but the player must win by two games. If the set score gets to 6-5 (or 5-6), the players play a twelfth game. If the set score is 7-5 (or 5-7), the set is over. If the players are tied at 6-6 they play a special game called a tiebreak and the winner of the tiebreak wins the set, 7-6 (or 6-7). At the Australian Open, French Open, and Wimbledon, there is a special exception and in the fifth set they do not play a tiebreak. They just keep playing regular games until one player is ahead by two games (resulting in some fantastic 5 hour matches!) More details on the tennis scoring system are available here: http: //en.wikipedia.org/wiki/Tennis_scoring_system. As an example of the input format, here is the result of the men’s final at the 2015 Australian Open:


In this match, player Novak Djokovic defeated player Andy Murray in a four set match. Djokovic won the first set (which went to a tiebreak). Murray won the second set (also a tiebreak). In the third set Murray only won three games, and in the last set Murray did not with any games.


File I/O and Command Line Arguments Your program will run with three command-line arguments. The first is the input file containing the match information. The second is the output file where you will write the computed statistics. The third argument will indicate which data table should be printed. Valid options for the third argument are: --match_stats, --game_stats, or --custom_stats. For example, here is a valid command line to your program: 


Related Questions in computer science category