Käynnissä

Basketball, 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

Use the input files, team name file and scores file. Scores updated 2/7/17 (games played through 2/6/17)

Use this struct to store the data for each team:

struct NBA_Team

{

string name;

string conference;

string division;

unsigned short wins;

unsigned short losses;

float pct;

};

Use strings to store all character data for this assignment. C-strings may not be used in this assignment.

The program output must show the current standings using the team input data and the percentage calculations.

You may not use stringstream (or istringstream or ostringstream) objects or c-string functions for this assignment.

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/7/17 (contains games played through 2/6/17)

Western Conference

Southwest Division W L Pct

San Antonio Spurs 39 12 [url removed, login to view]

Houston Rockets 37 17 [url removed, login to view]

Memphis Grizzlies 32 22 [url removed, login to view]

Dallas Mavericks 20 31 [url removed, login to view]

New Orleans Pelicans 20 32 [url removed, login to view]

Pacific Division W L Pct

Golden State Warriors 43 8 [url removed, login to view]

Los Angeles Clippers 31 21 [url removed, login to view]

Sacramento Kings 20 32 [url removed, login to view]

Los Angeles Lakers 18 36 [url removed, login to view]

Phoenix Suns 16 36 [url removed, login to view]

Northwest Division W L Pct

Utah Jazz 33 19 [url removed, login to view]

Oklahoma City Thunder 30 23 [url removed, login to view]

Denver Nuggets 23 28 [url removed, login to view]

Portland Trail Blazers 22 30 [url removed, login to view]

Minnesota Timberwolves 19 33 [url removed, login to view]

Eastern Conference

Southeast Division W L Pct

Washington Wizards 30 21 [url removed, login to view]

Atlanta Hawks 30 22 [url removed, login to view]

Charlotte Hornets 23 28 [url removed, login to view]

Miami Heat 22 30 [url removed, login to view]

Orlando Magic 20 33 [url removed, login to view]

Central Division W L Pct

Cleveland Cavaliers 35 15 [url removed, login to view]

Indiana Pacers 29 22 [url removed, login to view]

Chicago Bulls 26 26 [url removed, login to view]

Detroit Pistons 24 28 [url removed, login to view]

Milwaukee Bucks 22 28 [url removed, login to view]

Atlantic Division W L Pct

Boston Celtics 33 18 [url removed, login to view]

Toronto Raptors 32 21 [url removed, login to view]

New York Knicks 22 31 [url removed, login to view]

Philadelphia 76ers 18 33 [url removed, login to view]

Brooklyn Nets 9 42 [url removed, login to view]

Program Notes

There are 30 NBA teams, 15 in each conference. The conferences are Western and Eastern. There are 6 divisions with 5 teams in each division.

The scores file will also require specific parsing techniques. Skip over the date and time columns (the first 12 bytes). Skip over the mostly blank records that show the tie score before overtime.

To calculate the team percentage, use the formula:

pct = wins / total games played

To sort the data for the output standings, you might want to create a "sortkey" function, consisting of the conference, division, and percentage. Then you can sort using the "sortkey".

And finally, as usual, this assignment contains some subtle aspects. Be sure to start early and allow enough time to ask the instructor for help.

Recommendation, when you start, use a small subset of the scores file to make sure you are correctly calculating the statistics.

Taidot: C++ -ohjelmointi

Näytä lisää: calling dll string, basketball graphics

About the Employer:
( 1 review ) San Jose, United States

Projektin tunnus: #13087981

Myönnetty käyttäjälle:

25 $ USD 1 päivässä
(2 arvostelua)
2.0

28 freelanceria on tarjonnut keskimäärin 53 $ tähän työhön

it2051229

Hi there, I would like to do this project if given the opportunity. Let me know if you are interested so I can have further details. Thanks.

30 $ USD 1 päivässä
(524 arvostelua)
6.9
111 $ USD 1 päivässä
(54 arvostelua)
7.0
TopTower22

hello,how are you. i read your bid carefully. i am c/c++ expert and have full experience for 10 years. c++ language is my top skill. i can provide most quality and high speed. if you want to success, please contact Lisää

25 $ USD 1 päivässä
(31 arvostelua)
6.2
hbxfnzwpf

I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on client side, using c++ under Windows envir Lisää

50 $ USD 1 päivässä
(68 arvostelua)
6.4
wangbeizou

Hello. How are you. I have read and understood the project. I'm an Expert in Data Structures and Algorithms. And I know well ; Java ,C/C++, Python ,PHP. I'm interested this project. So, firstly I want to discu Lisää

30 $ USD 1 päivässä
(72 arvostelua)
5.8
wizard2015

Hi, I am experienced software developer and I am ready to complete this project for you very quickly, in few hours. You can find more information about me and my professional experience on the my freelancer profile pag Lisää

30 $ USD 1 päivässä
(56 arvostelua)
5.8
iridescent2x15

I m software engineer. I have read the description and I would like to work for you. For further details please inbox me. Thank you

200 $ USD 1 päivässä
(30 arvostelua)
5.2
11 $ USD 1 päivässä
(48 arvostelua)
4.9
zabolotniipavel

Hi, I have Master Degree in Computer Science. and great experience in C++ and algorithms. I read carefully the description and understand how to solve this task. All of my employers are satisfied with the quality and s Lisää

30 $ USD 1 päivässä
(44 arvostelua)
5.1
agragaurav

Hi, Could you please clarify on whether the input is going to be RTF format or in text format that you've just converted to RTF for upload? If it is a text file, could you please share the same? I am assuming scores Lisää

50 $ USD 1 päivässä
(6 arvostelua)
4.5
shahidost

Hi, I hope you will be doing well. I believe on perfect work with 100% satisfaction of my client then payment. I deliver only exceptionally robust and well-designed work as a rule to my client. I understand you Lisää

25 $ USD 1 päivässä
(42 arvostelua)
4.9
harshdaga

Hi, I've got quite some experience with C and C++ and I'm sure I can help you out with your project. May I get more details over the chat?

30 $ USD 1 päivässä
(37 arvostelua)
4.5
athukoralakasun

Hi I am a Computer Engineering Masters Student. I am an expert on C++. I can do your project. Please message me with further details. Kind regards

100 $ USD 3 päivässä
(15 arvostelua)
4.6
AhmedLabib93

Hello My name is Ahmed, i'm a top rated freelancer. i worked over 250 projects and over 600 hours doing C++ and Java projects. small overview of feedback on my profile "you want to get your projects completed wi Lisää

25 $ USD 1 päivässä
(27 arvostelua)
4.2
narekGuru

Hi, can finish your task in max 2-6 hrs after bid acceptance. Will provide fully functional, bug free and commented code. And if you consider my bid, please also let me know the compiler you are using. Kind Regards, Lisää

50 $ USD 0 päivässä
(7 arvostelua)
4.0
150 $ USD 1 päivässä
(5 arvostelua)
3.9
vtatarenko

A proposal has not yet been provided

111 $ USD 7 päivässä
(6 arvostelua)
2.9
Meccano7

A proposal has not yet been provided

30 $ USD 3 päivässä
(3 arvostelua)
1.3
40 $ USD 1 päivässä
(1 arvostelu)
0.6
qdcs524

The task is a simple manipulation of string information for sorting and statistics. I can do this job in due time. But I will have to convert the RTF file into text file in MSWord.

30 $ USD 1 päivässä
(1 arvostelu)
0.5