ETM – 3030 Team standings 100 points Write an application which will maintain a record of statistics and standings of teams in a sports league or division. Information for each team will include: team...

Please help me create this application I have only the Form ready but I can't figure out the rest.


ETM – 3030 Team standings 100 points Write an application which will maintain a record of statistics and standings of teams in a sports league or division. Information for each team will include: team name, number of games played, number of won, number of games lost, total number of points scored by a team, total number of points scored against a team, and the winning percentage of the team. The application should compute and sort the league standings. Run the application LeagueStandings.exe in the ETM- 303 shared folder to execute the application. Input Read the data from a file (ask the user for the name of the file). The input will be in two parts. The first part will be for the purpose of initialization. The first data item will be the number of teams in the league. This will be followed by that number of team names, each on a separate line. Following the initialization part, there may be any number of sets of update data. Each set will begin with a number indicating how many games played are to follow. Then, on the specified number of subsequent lines will be given the team name and score of the games played in the form each on its own separate line. You are to continue to process until the end of the file is reached. Your input code should be in a try catch block to catch any exceptions encountered in the input data. Your program should never crash under any circumstances. See the last page of this document for more detail on the format of the input data file. Data Structure Store all the team data in parallel arrays. Assume that there will be no more than 20 teams in any division. Do not store games lost. Compute the games lost by subtracting games won from games played. Array values are automatically initialized to zero when created in memory. const int MAXTEAMS = 20; // maximum number of teams in the division string[] teamName = new string[MAXTEAMS]; // list of team names int[] gamesPlayed = new int[MAXTEAMS]; // number of games played by team int[] gamesWon = new int[MAXTEAMS]; // number of games won by team int[] pointsFor = new int[MAXTEAMS]; // total points scored by team int[] pointsAgainst = new int[MAXTEAMS]; // total points against team double[] winningPct = new double[MAXTEAMS]; // winning percentage int size = -1; // actual number of teams in the division StreamReader inputFile;// input file int NumRound = 0;// number of rounds of games Required Methods Your application must include the following two methods: private int FindIndex(string target) – Given a team name (target) this method will return the index of the team name (target) in the teamName array. private void displayStandings() – Creates a dataTable and add rows to the dataTable and displays the table in a dataGridView control. Form Load Event Flowchart Next Round Event Click Event teamStats.csv file on shared driver under Team Standings foldert. � � � � Start form load event Read number of teams in division Count=0 Count < number="" of="" teams="" in="" division="" read="" team="" into="" teamname="" array="" increment="" count="" set="" size="count" end="" yes="" no="" read="" number="" of="" games="" in="" round="" count="0" count="">< number="" games="" in="" round="" read="" team1,="" score1,="" team2="" score="" 2="" update="" gamesplayed,="" pointsfor,="" pointsagainst="" for="" both="" teams="" score="" 1=""> score2 Increment gamesWon of team1 Increment gamesWon of team2 Update winningPCT of both teams Increment Count DisplayStandings End Start next round event Find index of team1 in teamName array yes no yes no Find index of team2 in teamName array � � � � Read number of games in round Count = 0 Count < number="" games="" in="" round="" read="" team1,="" score1,="" team2="" score="" 2="" update="" gamesplayed,="" pointsfor,="" pointsagainst="" for="" both="" teams="" score="" 1=""> score2 Increment gamesWon of team1 Increment gamesWon of team2 Update winningPCT of both teams Increment Count Find index of team1 in teamName array DisplayStandings End Find index of team2 in teamName array Start next round event � yes no yes no Start form load event Read number of teams in division Count=0 Count < number of teams in division read team into teamname array increment count set size = count end yes no 8,,, whales,,, starfish,,, lobsters,,, crabs,,, sharks,,, dolphins,,, seals,,, bluefish,,, 3,,, lobsters,3,sharks,5 seals,1,starfish,2 bluefish,2,whales,3 5,,, crabs,10,dolphins,6 seals,4,lobsters,3 whales,1,starfish,3 sharks,5,crabs,7 dolphins,3,bluefish,2 4,,, starfish,11,dolphins,9 whales,4,seals,3 bluefish,0,sharks,4 crabs,8,lobsters,3 6,,, dolphins,7,seals,2 starfish,3,sharks,6 bluefish,3,crabs,5 lobsters,4,whales,2 sharks,6,dolphins,4 seals,0,bluefish,1 2,,, lobsters,3,starfish,5 crabs,12,whales,2 number="" of="" teams="" in="" division="" read="" team="" into="" teamname="" array="" increment="" count="" set="" size="count" end="" yes="" no="" 8,,,="" whales,,,="" starfish,,,="" lobsters,,,="" crabs,,,="" sharks,,,="" dolphins,,,="" seals,,,="" bluefish,,,="" 3,,,="" lobsters,3,sharks,5="" seals,1,starfish,2="" bluefish,2,whales,3="" 5,,,="" crabs,10,dolphins,6="" seals,4,lobsters,3="" whales,1,starfish,3="" sharks,5,crabs,7="" dolphins,3,bluefish,2="" 4,,,="" starfish,11,dolphins,9="" whales,4,seals,3="" bluefish,0,sharks,4="" crabs,8,lobsters,3="" 6,,,="" dolphins,7,seals,2="" starfish,3,sharks,6="" bluefish,3,crabs,5="" lobsters,4,whales,2="" sharks,6,dolphins,4="" seals,0,bluefish,1="" 2,,,="" lobsters,3,starfish,5="">
Oct 27, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here