题意:
分析男子冰球比赛的结果
解析:
编写一个程序,接受三个参数,第一个参数是作为输入文件的冰球比赛信息,第二个参数是输出文件的名称,第三个参数是打印哪个数据表(--team_stats, --player_stats, or --custom_stats)。
其中:--team_stats的表格是按照队伍胜率的百分比进行从上到下的排序,如果胜率相同则按总进球最多进行排序,若还相等则按照球队的字母进行排序。该表格的每一行包括队伍的名字、胜利、失败、平局、胜率、进球、犯规。
--player_stats的表格是球员的信息,包括名字、所属队伍、进球、助攻、犯规这些信息,并且按照进球加上助攻的总计进行排序,如果相等按姓名排序。
--custom_stats表格是自己设计的一系列表格,需要按前两个表格的格式输出一些信息。并且写一个README对这些信息进行描述:这些数据反应了什么问题,为什么需要这些数据等。
注:在输入文件中,人名和球队名中的空格以下划线替代,在处理输入时最好使用">>"的流输入,而不是getline或者getc,不应该以文件的空格、制表符或是换行符去判断输入。
涉及知识点:
文件读取,流,数据处理
更多可加微信讨论
微信号:tiamo-0620

pdf全文
CSCI-1200 Data Structures — Fall 2019 Homework 2 — Hockey Classes
In this assignment you will parse and organize the game results from NCAA Division I Eastern College Athletic Conference men’s ice hockey. Many of you may already be familiar with the basics of this sport – it is one of Rensselaer’s most popular athletics events. We summarize everything you need to know to complete this assignment. Please read the entire handout before starting to code the assignment.
Ice Hockey
Here’s a crash course on the rules of ice hockey: Each game between two teams consists of three periods of twenty minutes each. Six players from each team are allowed on the ice at any one time. The players work together to score a goal by hitting the puck into the opponents’ net. Usually one of the six players on each team is designated as the goalie to guard the net. When a goal is scored, one member of the team is credited with the score, and up to two other players are credited with assisting in the score. There are many rules and restrictions on the details of play. If these rules are violated the offending player/team is given a penalty of a two, five, or ten minute duration. During the penalty time period, the offending player must sit out (in the penalty box) and that team plays short-handed (with 5 players instead of 6). The other team has an advantage during this time – the so-called power play.
If the score is tied at the end of the 3 regular periods, the teams will play an additional overtime period. Play ends with the first goal scored in overtime (sudden death), and that team wins. If neither team scores during overtime, we will consider the result of this game a tie. Note: Normally the game proceeds to a shootout to resolve the tie. For more information see: http://en.wikipedia.org/wiki/... and http://en.wikipedia.org/wiki/...
You will parse an input file which contains the details for one or more hockey games. The data was originally obtained from: http://collegehockeystats.net/. The data has been pre-processed to make your work a bit simpler. Here is a partial input file for your program:

更多详情请添加微信哦


danannan
1 声望0 粉丝