Assignment 5 - Basketball, structs, and the string class

due Saturday, February 17th

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 2/5/18 (contains games played through 2/4/18)

Western Conference

Southwest Division      W     L     Pct
Houston Rockets        38    13   0.745
San Antonio Spurs      34    21   0.618
New Orleans Pelicans   28    24   0.538
Memphis Grizzlies      18    34   0.346
Dallas Mavericks       17    36   0.321

Pacific   Division      W     L     Pct
Golden State Warriors  41    12   0.774
Los Angeles Clippers   26    25   0.510
Los Angeles Lakers     21    31   0.404
Phoenix Suns           18    36   0.333
Sacramento Kings       16    36   0.308

Northwest Division      W     L     Pct
Minnesota Timberwolves 34    22   0.607
Oklahoma City Thunder  30    24   0.556
Portland Trail Blazers 29    24   0.547
Denver Nuggets         28    25   0.528
Utah Jazz              24    28   0.462

Eastern Conference

Southeast Division      W     L     Pct
Washington Wizards     30    22   0.577
Miami Heat             29    24   0.547
Charlotte Hornets      23    29   0.442
Atlanta Hawks          16    37   0.302
Orlando Magic          15    36   0.294

Central   Division      W     L     Pct
Cleveland Cavaliers    30    21   0.588
Milwaukee Bucks        29    23   0.558
Indiana Pacers         30    24   0.556
Detroit Pistons        25    26   0.490
Chicago Bulls          18    34   0.346

Atlantic  Division      W     L     Pct
Boston Celtics         39    15   0.722
Toronto Raptors        36    16   0.692
Philadelphia 76ers     25    25   0.500
New York Knicks        23    31   0.426
Brooklyn Nets          19    35   0.352



Program Notes