PREPARATION:
Preparation for this assignment mostly consists of making sure that your Visual Studio 2010
Solution and Project Spaces for the assignment are set up correctly so that you can easily submit the
required files. You will need to set up a new solution called cstudentnumberPA2 within your
U:\GENG1003 folder. Within the solution have a single project called Assignment2.
PROBLEM STATEMENT:
The English Premier League (EPL) is the main sporting event in England each year. The game is
called Soccer in Australia because we play 4 different types of football; however, most of the world
simply refer to the game as Football. The Premier League has lost the source code for the program
that reports the current table of team standings. Normally, this would not cause problems because
the compiled program will continue to work until the end of the current season, whereupon it can be
replaced.
However, there is a need to report on the relative positions of the teams just including the results
from late September or October onwards on a month by month basis (or maybe two months at a
time), so clubs can know which Managers possibly need to be replaced – something that happens
regularly when a team is underperforming. So, the program needs to be re-written in its simplest
possible form to supply this information. The program will just use simple text files for input.
You will need to write a program that allows the league to feed in a simple text file of individual
match results and produce lists that are ordered alphabetically, as well as, in team performance
order.
For the Premier League, we will use shortened team names. There are 20 teams.
BACKGROUND:
Results for an EPL game are reported giving the names of the teams and the number of goals
scored, e.g. TeamA 3 TeamB 2. Note that this means that TeamA has won the game 3-2, while
TeamB has lost the game 2-3. If the number of goals for each team is equal, then the game result is
a draw, e.g. TeamC 1 TeamD 1 would be a 1-1 draw for both teams.
The teams are awarded league points for each game played: 3 for a win, 1 for a draw, and 0 for a
loss. The best team across the season (or in our case, across the time period at hand) is the team
with the most league points. If two teams have the same number of league points then the team with
the best “goal difference” is considered better, while if both these measures are equal for two teams,
then the better team is the one which has scored the most goals (make sure you read these
conditions carefully and understand them). If teams are still equal, they are simply ranked in
alphabetical order.
In order to properly report the partial league results needed, you will need to hold data (for the
current time period) for each team comprising: Games Played, League Points, Goals Scored (“Goals
For”) and Goals Conceded (“Goals Against”). The above data, along with a string to hold the team
name (a character array large enough to hold the longest name – say 16 characters), is best stored in
a C-struct for each team, with an array of these struct(s) being the complete data held for the whole
league.
NOTE: For C-struct, please refer to the lecture notes added to the assignment. Feel free to
consult during tutorial times.
1
Expert's answer
2014-01-10T13:56:38-0500
Dear customer, Unfortunately, your question requires a lot of work and cannot be done for free. Please submit it with all requirements as an assignment to our control panel and we'll assist you.
Comments
Leave a comment