Assignment 5 - Basketball, structs, and the string class

due February 13th

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 NBA_Team 
{
    string name;
    string conference;
    string division;
    unsigned short wins;
    unsigned short losses;
    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.

Output updated 1/1/18 (contains games played through 12/31/17)

Western Conference

Southwest Division      W     L     Pct
Houston Rockets        26     9   0.743
San Antonio Spurs      25    12   0.676
New Orleans Pelicans   18    18   0.500
Dallas Mavericks       13    25   0.342
Memphis Grizzlies      12    25   0.324

Pacific   Division      W     L     Pct
Golden State Warriors  29     8   0.784
Los Angeles Clippers   16    19   0.457
Phoenix Suns           14    24   0.368
Sacramento Kings       12    24   0.333
Los Angeles Lakers     11    24   0.314

Northwest Division      W     L     Pct
Minnesota Timberwolves 23    14   0.622
Oklahoma City Thunder  20    17   0.541
Denver Nuggets         19    17   0.528
Portland Trail Blazers 18    17   0.514
Utah Jazz              16    21   0.432

Eastern Conference

Southeast Division      W     L     Pct
Washington Wizards     21    16   0.568
Miami Heat             19    17   0.528
Charlotte Hornets      13    23   0.361
Orlando Magic          12    25   0.324
Atlanta Hawks          10    26   0.278

Central   Division      W     L     Pct
Cleveland Cavaliers    24    12   0.667
Detroit Pistons        20    15   0.571
Milwaukee Bucks        19    15   0.559
Indiana Pacers         19    18   0.514
Chicago Bulls          13    23   0.361

Atlantic  Division      W     L     Pct
Boston Celtics         30    10   0.750
Toronto Raptors        24    10   0.706
New York Knicks        18    18   0.500
Philadelphia 76ers     17    19   0.472
Brooklyn Nets          13    23   0.361



Program Notes