A league of community sports teams wants some software to help decide the top, or premiership, team at the end of the year. Teams collect a certain number of premiership points each round and, after each round, we want the software to work out their premiership point total so far since the start of the year.

The preliminary task for your assignment is to produce a simple Java application to do the following. There will be one user of the software who enters all the data after each round is complete. The user starts the program and enters the results for each game played in turn. This preliminary version of the software does not store anything about the competition so everything needed is entered by the user. Each game involves two teams playing each other. Teams play at most once per round. One team is the "home" team (ie the game is played at their home ground) and the other team is the "away" team. The sport has a rather strange scoring system. Each team scores a certain number of "goals" and a certain number of "behinds". The total point score for each team in the game is the total of the number of behinds plus six points for each goal. The winning team is the team with the highest point score. If both teams have the same score then the game is "tied".

The number of premiership points (ie those which eventually decide the top team) awarded for each team in a game depends on whether or not the home team wins. If the home team wins it gets 3 premiership points and the losing team gets 0 points. If the away team wins it gets 4 points and the losing team gets 0 points. If there is a tie then the away team gets 2 points and the home team gets 1 point.

For each game the user enters information about the home team, then information about the away team. For the home team enter: name of team, goals scored, behinds scored and previous total of premiership points. The software should force the user to correct mistakes such as entering empty names or negative numbers. The program should then report on the total game score for the home team. The same should then be done for the away team. The program should then report which is the winning team (or if there is a tie) and output the number of premiership points gained by each of the two teams and their new totals for the year so far.

After dealing with each game the user should be given the option of entering information about another game or indicating that all the games for the round have been entered. In the case that all games have been dealt with then the software should report on which team won its game by the biggest difference in scores compared to its opponent and the software should also report on the average game score for all teams that have played.

The program should be well-structured and should have a reasonable set of methods in addition to the main method. It should use a good coding style, proper indentation, meaningful identifiers and appropriate comments throughout.

Please note that this question does not require you to define separate classes or a separate client program. However you are welcome to do so if you wish. Also note that the question does not require the use of arrays.

Your program should also include a method (eg, StudentInfo( )) to output your student details (name, student number, mode of enrolment, tutor name, tutorial attendance day and time) at the start of program output. Devise suitable test data to test all sections of program code. The test data together with test resultsshould be submitted as part of your external documentation.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.