Assignment 5 - Football, structs, and the string class

due Monday, 10/30

The purpose of this assignment is to give you practice using structs and the string class.


Program Steps

Read a file containing team names, their conferences and divisions.  This data will be stored in an array of structs.
Read a file containing scores.  Each record in the file must be parsed to determine the winning and losing team.  The number of wins, losses and percentage must be calculated using the data in the scores file.
The array of structs must be sorted by conference, division, and percentage to produce output equivalent to that shown below.

Program Requirements

struct NFL_Team
{
    string name;
    string conference;
    string division;
    unsigned short wins;
    unsigned short losses;   
    unsigned short ties;

    float pct;
};

Program Output

Your output should look quite similar to the following.  Note: the actual statistics will be different when you use the current scores file.

Games through 10/23/17


National  Football Conference

West  Division          W     L     T     Pct
Los Angeles Rams        5     2     0   0.714
Seattle Seahawks        4     2     0   0.667
Arizona Cardinals       3     4     0   0.429
San Francisco 49ers     0     7     0   0.000

South Division          W     L     T     Pct
New Orleans Saints      4     2     0   0.667
Carolina Panthers       4     3     0   0.571
Atlanta Falcons         3     3     0   0.500
Tampa Bay Buccaneers    2     4     0   0.333

North Division          W     L     T     Pct
Minnesota Vikings       5     2     0   0.714
Green Bay Packers       4     3     0   0.571
Detroit Lions           3     3     0   0.500
Chicago Bears           3     4     0   0.429

East  Division          W     L     T     Pct
Philadelphia Eagles     6     1     0   0.857
Dallas Cowboys          3     3     0   0.500
Washington Redskins     3     3     0   0.500
New York Giants         1     6     0   0.143

American  Football Conference

West  Division          W     L     T     Pct
Kansas City Chiefs      5     2     0   0.714
Denver Broncos          3     3     0   0.500
Oakland Raiders         3     4     0   0.429
Los Angeles Chargers    3     4     0   0.429

South Division          W     L     T     Pct
Tennessee Titans        4     3     0   0.571
Jacksonville Jaguars    4     3     0   0.571
Houston Texans          3     3     0   0.500
Indianapolis Colts      2     5     0   0.286

North Division          W     L     T     Pct
Pittsburgh Steelers     5     2     0   0.714
Baltimore Ravens        3     4     0   0.429
Cincinnati Bengals      2     4     0   0.333
Cleveland Browns        0     7     0   0.000

East  Division          W     L     T     Pct
New England Patriots    5     2     0   0.714
Buffalo Bills           4     2     0   0.667
Miami Dolphins          4     2     0   0.667
New York Jets           3     4     0   0.429


Program Notes