Firstly ,i'm not asking about the code,i need suggestion and idea how to do it.I don't even know what should be the first thing in the main menu,because i think it is not some sort of input and output program.I thought i might relate to something like queue or stack .Please help!
Consider the following scenario:
Access points are installed on airport hallway to enable users to communicate over the internet. Assuming passengers are holding a PDA. To enable them to stay connected to the internet, the AP will assign dynamic IP to each passenger. Each AP maintains a table of IPs (maximum 3 each). As passenger moves away from an AP the IP will be released, while another passenger moving closer to an AP will be assigned an available IP. Packet sent by a passenger nearest to an AP will arrive earlier than packet sent by farther away passenger. Later packet received may not be assigned with IP if all IPs are allocated.