not sure if this should be in the games forum as it's part of my games development module at uni

basically I'm stuck with an assignment, here's my brief

Create a program within the POP framework that starts up with 8 objects placed randomly in the game window. The objects should behave in the following way:

They should be selectable with the mouse and have the capacity to be dragged by the mouse
When one object comes within a certain distance of another object they should be attracted together and a visible link should automatically form between the objects. Thus the objects should have the ability to form into a chain.
They should be removable from the chain by selecting with the mouse and dragging from the chain. When this happens the objects on each side of the removed link should form a link between themselves so that the chain re-forms minus the link that has been removed. Objects that are placed close to the chain are automatically linked into the chain. Thus, objects can be manually removed from the chain and re-inserted into the chain at any position.
The objects should be identified in some way that indicates order (for example, they could be numbered 1 to 8).
They should be automatically sorted into order by selecting a suitable menu item

I just need some advice about where to start, i'm not asking for someone to do it for me, any advice would be greatly appreciated, thanks