class Football { public static void main (String[] param) { String Returned[] = game(); tables(); System.exit(0); } // END main public static String[] game() { //declare variables String[] Teams = new String [6]; int NoOfTeams = 6; String TeamA; String TeamB; String ScoreTeamA; String ScoreTeamB; int ScoreA; int ScoreB; String Winner; String[] Returned = new String[2]; Teams[1] = "Man U"; Teams[2] = "Spurs"; Teams[3] = "Chelsea"; Teams[4] = "West Ham"; Teams[5] = "Gunners"; {//Start main part TeamA = JOptionPane.showInputDialog("What is the name of the 1st Team that is playing " + "today? "); TeamB = JOptionPane.showInputDialog("What is the name of the 2nd team playing " + "today?"); ScoreTeamA = JOptionPane.showInputDialog("How many goals did" + " " + TeamA + " " + "score?"); ScoreA = Integer.parseInt(ScoreTeamA); ScoreTeamB = JOptionPane.showInputDialog("How many goals did" + " " + TeamB + " " + "score?"); ScoreB = Integer.parseInt(ScoreTeamB); }//End main part { //Find the winner if (ScoreA > ScoreB) Winner = TeamA; else Winner = TeamB; }//End find the winner JOptionPane.showMessageDialog(null, "The winner is" + " " + Winner + "!!"); //declare winner Returned[0] = Winner; Returned[1] = "test"; return Returned; } // END Game public static void tables() { } } // END class football