- My default constructor for Team created a new Employee for the team leader. Do I really want a new Employee each time I create a new Team with no details (answer: unlikely). Therefore, I should change the default constructor to set the new teamLeader to null
- If I change the default constructor, my toString method will fail anytime there is a null teamLeader.
- I need to modify my getTeamLeader method to check if the teamLeader is null, and if so, return a String "no team leader assigned" (or equiv)
- I also need to double-check my code for typos and accidential capitilisations which will just cause confusion!
:)
No comments:
Post a Comment