public class WorldCup {
public String team1;
public String team2;
public String team3;
public String team4;
public String team5;
public String color;
public WorldCup (String team1, String team2, String team3, String team4, String team5, String color) {
this.team1 = team1;
this.team2 = team2;
this.team3 = team3;
this.team4 = team4;
this.team5 = team5;
this.color = color;
}
public String getTeam1() {
return team1;
}
public String getTeam2() {
return team2;
}
public String getTeam3() {
return team3;
}
public String getTeam4() {
return team4;
}
public String getTeam5() {
return team5;
}
public void main(String[] args) {
System.out.println("Team 1: " + this.team1);
System.out.println("Team 2: " + this.team2);
System.out.println("Team 3: " + this.team3);
System.out.println("Team 4: " + this.team4);
System.out.println("Team 5: " + this.team5);
System.out.println("Team Colors: " + this.color);
}
}
public class Argentina extends WorldCup {
public Argentina(String team1, String team2, String team3, String team4, String team5, String color) {
super(team1, team2, team3, team4, team5, color);
}
}
public class Portugal extends WorldCup {
public Portugal(String team1, String team2, String team3, String team4, String team5, String color) {
super(team1, team2, team3, team4, team5, color);
}
}
public class Morocco extends WorldCup {
public Morocco(String team1, String team2, String team3, String team4, String team5, String color) {
super(team1, team2, team3, team4, team5, color);
}
}
public class Croatia extends WorldCup {
public Croatia(String team1, String team2, String team3, String team4, String team5, String color) {
super(team1, team2, team3, team4, team5, color);
}
}
public class Brazil extends WorldCup {
public Brazil(String team1, String team2, String team3, String team4, String team5, String color) {
super(team1, team2, team3, team4, team5, color);
}
}
Argentina arg = new Argentina("Argentina", "Null", "Null", "Null", "Null", "Blue and White");
Portugal por = new Portugal("Portugal", "Null", "Null", "Null", "Null", "Green and Red");
Morocco mor = new Morocco("Morocco", "Null", "Null", "Null", "Null", "Green and Red");
Croatia cro = new Croatia("Croatia", "Null", "Null", "Null", "Null", "Red and White");
Brazil brz = new Brazil("Brazil", "Null", "Null", "Null", "Null", "Green and Yellow");
arg.main(null);
por.main(null);
mor.main(null);
cro.main(null);
brz.main(null);