I am looking for a way to write an algorithm to form teams based on roles, there should be an even distribution of roles within a team.
For example Let's say I have a group of 112 students, 28 Project Managers, 28 Marketeers, 28 Coders and 28 Designers. They should be formed into teams of 8 consisting of 2 Project Managers, 2 Marketeers, 2 Coders and 2 Designers.
How would I structure a class that randomly generate teams with an even distribution of roles? Any help would be greatly appreciated.
Regards, Al