Ruritanian Football Team

  • Posted
  • Proposals 0
  • Remote
  • #5408
  • Archived
  • 1

Description

Experience Level: Expert
Ruritanian Football League

The Ruritanian Football League consists of 8 teams in 2 divisions:-

Division 1

Team Code Team Name
1 AR Arad
2 BR Braila
3 CR Craiova
4 DR Drobeta

Division 2

Team Code Team Name
5 ES Escandov
6 FO Foscani
7 GR Gronstadt
8 HE Hermansburg

Each team plays the other three teams within the same division twice: home and away.

Points are awarded on the result of each game as follows:-

Result Points
Away win 3
Home win 2
Draw 1
Lose 0

At the end of the season:-

1. The team with the highest number of points in each division is the division champion.
2. In the case of two teams having an equal number of points the team with the largest goal difference is the winner.
3. The lowest team in division 1 is relegated to division 2 and the champion of division 2 is promoted.
4. In the case where two teams have the same lowest number of points the one with the smallest goal difference is relegated.

The results of each round of matches is recorded as follows:-

AR 1 BR 2
CR 0 DR 0
ES 2 FO 1
GR 6 HE 3

You are to develop a working Java Program that will :-

1. Calculate and display the following statistics for each team:-

a. Total number of points
b. Number of games played
c. Number of goals scored
d. Number of goals conceded
e. Goal difference (goals scored minus goals conceded)
2. Display the name of the two division champions

3. Display the names of the two teams that are being promoted and relegated.

4. Display the list of teams in each division after the promotion/relegation has taken place.

ps. please annotate the program fully.

Clarification Board

    There are no clarification messages.