Answered step by step
Verified Expert Solution
Question
1 Approved Answer
undefined Create a new project in Code Blocks. Write a C++ program which reads the state Teams.txt you created in Part A using the appropriate
undefined
Create a new project in Code Blocks. Write a C++ program which reads the state Teams.txt you created in Part A using the appropriate data structure to manage the team data. For each Team calculate a raw win+loss score, where wins+loss equals the sum of points won or lost, and a curved rank using their median ability score to curve the data using the following formula: Rank = (Wins+Loss) / (MedianAbilityScore) 100 Don't forget to use the proper number types for true division. Sort the list of teams using the following rules: First sort the teams by curved rank. Teams with the same curved rank will be sorted by the raw win+loss record. Teams with the same curved rank and the same win+loss rank will be sorted by their MeanAbilityScore. If the above is all the same, sort by whoever has the least number of players. Output the sorted teams by Rank, TeamID, School Name, and win+loss to a file called "results.txt". The rank will be printed to 4 decimal places. At the end of the file, print a report containing the top 100 team IDs and School Names that will be invited to the State Tournament in two columns of idame pairs(see example), the total number of high school players in the state, and the average number of players per team. A sample "results.txt" file will be made available in the assignment folder. "results.txt" 528.814 483.333 480.645 475.000 470.370 468.966 464.516 464.286 462.069 462.069 460.606 459.155 458.824 458.182 456.716 456.250 454.545 453.968 448.485 446.875 437.500 437.037 436.923 436.364 436.111 435.484 433.333 432.258 432.258 430.303 430.303 429.412 429.333 427.778 427.273 111766 104332 113878 122153 107527 116650 104837 112887 127348 108569 109460 102518 120057 114687 129408 124496 122845 113473 121562 101784 124793 126209 130879 125339 124955 115125 122941 131688 123530 115943 128674 104288 105792 121347 111946 jhpkxhujbqcb High School 156 bnjsjdobk High School 145 prqinuoqzkg High School 149 wqasovxohomh High School 133 yjymgpoyf High School 127 qpmuqqfsztarkvz High School 136 himnhgudxb High School 144 vpwzzwmi High School 130 xtuxogbgero High School 134 cayrpsalniidbvi High School 134 usprdpwuoua High School 152 huvhiooedxjaf High School 163 dzrefypiqy High School 156 wdfgbphszm High School 126 hfmsgradoqpleth High School 153 Vswnfatsaww High School 146 eetlmnbdip High School 125 kulchsaq High School 143 gojlsbppyswymu High School 148 mennndvpyws High School 143 oackyjin High School 140 iznsuzvatwuvwq High School 118 sehrasewlityt High School 142 psvljngpphrods High School 144 qysyvwkbszeyzs High School 157 miqwupzhiljsm High School 135 xauolaqsalnjdrb High School 143 Ivayfmpjdw High School 134 abaaqsmlpakryrb High School 134 qyymkblmqyr High School 142 Ijzesryogd High School 142 sqnmqjrccwkko High School 146 koofupxvwy High School 161 vfdgucwibb High School 154 jmtvdnyfegfef High School 141 LLLL calcul "results.txt" Invitations and Statistics Report (102518 huvhiooedxjaf High School) (120057 dzrefypiqy High School) (114687 wdfgbphszm High School) (129408 hfmsgradoqpleth High School) (124496 vswnfatsaww High School) (122845 eetlmnbdip High School) (113473 kulchsaq High School) (121562 gojlsbppyswymu High School) (101784 mennndvpyws High School) (124793 oackyjin High School) (126209 iznsuzvatwuvwq High School) (130879 sehrasewiqityt High School) (125339 psvlingpphrods High School) (124955 qysyvwkbszeyzs High School) (115125 mlqwupzhiljbsm High School) (122941 xauolaqsalnjdrb High School) (131688 Ivayfmpjdw High School) (123530 abaaqsmlpakryrb High School) (115943 qyymkblmqyr High School) (128674 Ijzesryogd High School) (104288 sqnmqjrccwkko High School) (105792 koofupxvwy High School) (121347 vfdgucwibb High School) (111946 jmtvdnyfegfef High School) (110475 pabcurelogvl High School) (112319 zghbixseaftfm High School) (110917 xbohmzcqrmattk High School) (117135 cdveotnujb High School) (125569 ptsmzkrgrhkk High School) (129654 zekpzhnx High School) (111340 gxgfpzxwo High School) (119855 fdbigvocuk High School) (114517 kzfkspbvso High School) (116408 zgewqojaa High School) (100366 opwtmazrdcows High School) (110963 qvhsglytziuxx High School) (117491 bfopgtsustz High School) (116507 frwtcblrayhhlu High School) (120541 zgdcaukndnlhmtd High School) (101216 xrhfwzytoa High School) (118526 zbqsvkjbgpsttm High School) (130955 roxbwylut High School) (129399 kwncftccfsshzw High School) (126087 naaectymagcwph High School) (112153 rjpvkirsibsecad High School) (105416 cdpilnal High School) (132500 wirehgjxapmz High School) (115731 ojhcpqcpjvsr High School) (100554 bwhzatimovsu High School) (132219 blbontpzgt High School) (128408 xoztasjunhbmox High School) (102972 zhhntsablwdrd High School) (121365 bdotnbpf High School) (130353 sdsskbvy High School) (125239 ewfmgtbjdpqe High School) (111367 eyhizdpxqack High School) (109373 xqaqmznyooihqwa High School) (101732 ihnnlwnz High School) (114385 pdfjvshlxfp High School) (105170 ocepjfahpohtb High School) (118318 slxyrjqymd High School) (115525 tagoydbjqdzvh High School) (108130 exblighjftxiyf High School) (123275 jzhtynuftvwaces High School) (100801 jgfzxhzvlh High School) (129158 nlxvwevdrtloys High School) (105724 gvbgfhzfsjqx High School) (109795 xxizzhdfr High School) (100161 yrwtzyskcifedk High School) (132337 bchpehfkirl High School) (109971 krwakktjovs High School) (100995 xrimqssgkf High School) (116388 bbrbtvnmibc High School) (128194 ftfnkfpdqre High School) (121119 mgkuhbketvorv High School) (132091 hommikmws High School) (123430 quotfhtkxzb High School) (110983 nqagzgxbwyaa High School) ********* Statistics Report************** Total Number of Players: 95072 Average Players per Team: 19 Create a new project in Code Blocks. Write a C++ program which reads the state Teams.txt you created in Part A using the appropriate data structure to manage the team data. For each Team calculate a raw win+loss score, where wins+loss equals the sum of points won or lost, and a curved rank using their median ability score to curve the data using the following formula: Rank = (Wins+Loss) / (MedianAbilityScore) 100 Don't forget to use the proper number types for true division. Sort the list of teams using the following rules: First sort the teams by curved rank. Teams with the same curved rank will be sorted by the raw win+loss record. Teams with the same curved rank and the same win+loss rank will be sorted by their MeanAbilityScore. If the above is all the same, sort by whoever has the least number of players. Output the sorted teams by Rank, TeamID, School Name, and win+loss to a file called "results.txt". The rank will be printed to 4 decimal places. At the end of the file, print a report containing the top 100 team IDs and School Names that will be invited to the State Tournament in two columns of idame pairs(see example), the total number of high school players in the state, and the average number of players per team. A sample "results.txt" file will be made available in the assignment folder. "results.txt" 528.814 483.333 480.645 475.000 470.370 468.966 464.516 464.286 462.069 462.069 460.606 459.155 458.824 458.182 456.716 456.250 454.545 453.968 448.485 446.875 437.500 437.037 436.923 436.364 436.111 435.484 433.333 432.258 432.258 430.303 430.303 429.412 429.333 427.778 427.273 111766 104332 113878 122153 107527 116650 104837 112887 127348 108569 109460 102518 120057 114687 129408 124496 122845 113473 121562 101784 124793 126209 130879 125339 124955 115125 122941 131688 123530 115943 128674 104288 105792 121347 111946 jhpkxhujbqcb High School 156 bnjsjdobk High School 145 prqinuoqzkg High School 149 wqasovxohomh High School 133 yjymgpoyf High School 127 qpmuqqfsztarkvz High School 136 himnhgudxb High School 144 vpwzzwmi High School 130 xtuxogbgero High School 134 cayrpsalniidbvi High School 134 usprdpwuoua High School 152 huvhiooedxjaf High School 163 dzrefypiqy High School 156 wdfgbphszm High School 126 hfmsgradoqpleth High School 153 Vswnfatsaww High School 146 eetlmnbdip High School 125 kulchsaq High School 143 gojlsbppyswymu High School 148 mennndvpyws High School 143 oackyjin High School 140 iznsuzvatwuvwq High School 118 sehrasewlityt High School 142 psvljngpphrods High School 144 qysyvwkbszeyzs High School 157 miqwupzhiljsm High School 135 xauolaqsalnjdrb High School 143 Ivayfmpjdw High School 134 abaaqsmlpakryrb High School 134 qyymkblmqyr High School 142 Ijzesryogd High School 142 sqnmqjrccwkko High School 146 koofupxvwy High School 161 vfdgucwibb High School 154 jmtvdnyfegfef High School 141 LLLL calcul "results.txt" Invitations and Statistics Report (102518 huvhiooedxjaf High School) (120057 dzrefypiqy High School) (114687 wdfgbphszm High School) (129408 hfmsgradoqpleth High School) (124496 vswnfatsaww High School) (122845 eetlmnbdip High School) (113473 kulchsaq High School) (121562 gojlsbppyswymu High School) (101784 mennndvpyws High School) (124793 oackyjin High School) (126209 iznsuzvatwuvwq High School) (130879 sehrasewiqityt High School) (125339 psvlingpphrods High School) (124955 qysyvwkbszeyzs High School) (115125 mlqwupzhiljbsm High School) (122941 xauolaqsalnjdrb High School) (131688 Ivayfmpjdw High School) (123530 abaaqsmlpakryrb High School) (115943 qyymkblmqyr High School) (128674 Ijzesryogd High School) (104288 sqnmqjrccwkko High School) (105792 koofupxvwy High School) (121347 vfdgucwibb High School) (111946 jmtvdnyfegfef High School) (110475 pabcurelogvl High School) (112319 zghbixseaftfm High School) (110917 xbohmzcqrmattk High School) (117135 cdveotnujb High School) (125569 ptsmzkrgrhkk High School) (129654 zekpzhnx High School) (111340 gxgfpzxwo High School) (119855 fdbigvocuk High School) (114517 kzfkspbvso High School) (116408 zgewqojaa High School) (100366 opwtmazrdcows High School) (110963 qvhsglytziuxx High School) (117491 bfopgtsustz High School) (116507 frwtcblrayhhlu High School) (120541 zgdcaukndnlhmtd High School) (101216 xrhfwzytoa High School) (118526 zbqsvkjbgpsttm High School) (130955 roxbwylut High School) (129399 kwncftccfsshzw High School) (126087 naaectymagcwph High School) (112153 rjpvkirsibsecad High School) (105416 cdpilnal High School) (132500 wirehgjxapmz High School) (115731 ojhcpqcpjvsr High School) (100554 bwhzatimovsu High School) (132219 blbontpzgt High School) (128408 xoztasjunhbmox High School) (102972 zhhntsablwdrd High School) (121365 bdotnbpf High School) (130353 sdsskbvy High School) (125239 ewfmgtbjdpqe High School) (111367 eyhizdpxqack High School) (109373 xqaqmznyooihqwa High School) (101732 ihnnlwnz High School) (114385 pdfjvshlxfp High School) (105170 ocepjfahpohtb High School) (118318 slxyrjqymd High School) (115525 tagoydbjqdzvh High School) (108130 exblighjftxiyf High School) (123275 jzhtynuftvwaces High School) (100801 jgfzxhzvlh High School) (129158 nlxvwevdrtloys High School) (105724 gvbgfhzfsjqx High School) (109795 xxizzhdfr High School) (100161 yrwtzyskcifedk High School) (132337 bchpehfkirl High School) (109971 krwakktjovs High School) (100995 xrimqssgkf High School) (116388 bbrbtvnmibc High School) (128194 ftfnkfpdqre High School) (121119 mgkuhbketvorv High School) (132091 hommikmws High School) (123430 quotfhtkxzb High School) (110983 nqagzgxbwyaa High School) ********* Statistics Report************** Total Number of Players: 95072 Average Players per Team: 19Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started