0% found this document useful (0 votes)
12 views2 pages

Midterm Project

Uploaded by

Chandu Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

Midterm Project

Uploaded by

Chandu Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Midterm Project:

CS602 – Fall 2024

Name of Group:
Name of group members:

There are 8 teams - team1 through team8 for EU Championship soccer tournament. Create two groups
as follows:

groupA - team1, team3, team5, and team7


groupB - team2, team4, team6, and team8

Winners and runners up from each group qualify for semifinals.

The semifinal matchup will be as follows:


Semifinal1 - Winner of groupA vs Runners up of groupB
Semifinal2 - Winner of groupB vs Runners up of groupA

The match up for the final will be as follows:


Winner of Semifinal1 vs Winner of Semifinal2

The winner of the final is the champion, and the loser is the runners up of the EU Championship.

For each match FIFA pays a team $1 million, for semifinals each team is paid $1.5 million, the champion
is paid $3 million, and the runner-up is paid $2 million. Create a polymorphic method called 'pay' that
will return a team's total earnings from this championship.

Write the program with one super class called 'Team', at least two sub classes, and a driver class in which
instantiate four teams - the champion, the runners up, a team that lost the semifinal, and a team that
only played group matches and could not qualify for the semifinal. Show how much each of these four
teams earned.

Write a constructor that the sub classes can use.

Write a toString() method that will represent current state of a team.

The current FIFA ranking for EU teams are as follows:


Rank1 – Spain - A
Rank2 – France - B
Rank3 – England - A
Rank4 – Belgium - B
Rank5 – Italy - A
Rank6 – Germany - B
Rank7 – Holland - A
Rank8 – Portugal - B
For the EU championship, the team with rank1 will be team1, team with rank2 will be team2, team with
rank3 will be team3, and so forth so on.

You might also like