I am using these instructions for the method: A constructor, public ProgrammingTeam( ProgrammingTeam p ), that takes a ProgrammingTeam p as a parameter and constructs a deep copy of p. Don’t just write meets = p.meets;. To make a deep copy, you must call ArrayList’s copy constructor: meets = new ArrayList();.
public ProgrammingTeam( ProgrammingTeam p ) {
teamName = p.teamName;
teamMembers = new String [ p.teamMembers.length ];
for (int i = p.teamMembers.length - 1; i >= 0; i--) {
}
meets = new ArrayList < Competition >();
}
I cannot figure out exactly how I am supposed to compose and then finish the deep copy. I know it is going to need a for loop to actually copy every object but I am at a loss, thanks!