Reach an agreement with all the team members about the rules that need to observed in the team.
Comment among the team members the expectations you have about the group. Try to state an objective that all team members commit to.
Share with the rest of the class some of the proposed rules and expectations.
Write a document containing the rules and the expectations and get it signed by all team members. Make a copy for each member and hand in the original to the professor.