Let's continue the implementation by implementing a class that models one team. So, write a (non-public) class Team with the following properties: Attribute 'name' (string) Some attribute to store the players in A constructor that takes the name as a parameter Set and get methods for the name Method addPlayer(Player p), which adds one player to the team The method printPlayers(), which prints the players in the order of addition as shown in the example below (first the number, then the name): Example output of players: 7. Pele 8. Ronaldo ================ import java.util.Random; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.HashMap; public class Test{ public static void main(String[] args){ final Random r = new Random(); System.out.println("Testing class Team..."); Team t = new Team("FC Turku"); System.out.println("Team object created!"); try { Field name = t.getClass().getDeclaredField("name"); boolean namePrivate = name.getModifiers() == 2; System.out.println("Name is private: " + namePrivate); } catch (Exception e) { System.out.println("Attribute name is not defined"); } System.out.println("Testing get methods..."); System.out.println("Name: " + t.getName()); System.out.println("Testing set methods..."); t.setName("University Football Club"); System.out.println("Name: " + t.getName()); System.out.println("Adding players to the team..."); Player p1 = new Player(7, "Ronaldo"); Player p2 = new Player(10, "Pele"); t.addPlayer(p1); t.addPlayer(p2); System.out.println("Players added!"); System.out.println("Printing players:"); t.printPlayers(); Player p3 = new Player(34, "Brad Baller"); t.addPlayer(p3); System.out.println("Players added!"); System.out.println("Printing players:"); t.printPlayers(); } } //ADD class Team { // attributes private String name; private ArrayList listPlayers; //constructor public Team(String name) { this.name = name; // need to initialise empty array, otherwise 'NullPointerException' this.listPlayers = new ArrayList<>(); } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public void addPlayer(Player p) { this.listPlayers.add(p); } public void printPlayers() { // int counter = 0; for (Player p: listPlayers) { // counter+=1; // System.out.println(counter + ". " + p.getName()); // a player has their own number, dont use 'counter' System.out.println(p.getNumber() + ". " + p.getName()); } } } Testing class Team... Team object created! Name is private: true Testing get methods... Name: FC Turku Testing set methods... Name: University Football Club Adding players to the team... Players added! Printing players: 7. Ronaldo 10. Pele Players added! Printing players: 7. Ronaldo 10. Pele 34. Brad Baller