Okay so my friend asked me to make a small program for an sports event. Here are the things he wants the program to do.
- User should be able to make as many objects as he/she wants (each object is representing a sports group) with values x and y which are integers. x = number of people in the group y = skill level of the group
- then the objects should be divided into 4 groups as equally as possible. For example if the sports event has 26 different groups 26/4 = 6-6-7-7
- Each of the four groups combined x and y's should be as close to each other as possible
I'm having a hard time finding the best approach to this. Could this be made using just an array? Or should I make objects list? And how I'm able to make the groups as equal as possible. If someone could point me in the right direction I'd be happy. I don't want to get the program handed to me but some general advice would be appreciated.
