1 Replies - 994 Views - Last Post: 21 October 2009 - 08:48 PM Rate Topic: -----

#1 low1988   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 10-August 09

Data Structure Scenario

Posted 21 October 2009 - 07:16 PM

I have a school project which is about :

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.

I am not asking about the code , i just want some suggestion from u guys ,what should be display at first on the main menu of the program.I am looking forward to implement the queue or stack technique for the project objective for assign the limited 3 IP.I'm confuse about the main interface of the program whether i should input something for the case above or select different scenario .

Is This A Good Question/Topic? 0
  • +

Replies To: Data Structure Scenario

#2 NickDMax   User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2255
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: Data Structure Scenario

Posted 21 October 2009 - 08:48 PM

Well a priority queue might be useful -- but all in all with 3 data elements an array would work just find. As for a stack or a queue -- lets think about this:

A stack is a FILO data structure... This does not seems to apply well to such a situation where the mobile devices are moving in and out of range dynamically...

A queue is a FIFO structure and seems to make a little more sense as people walk down the hallway... but what if someone turns around? IR just slows down or stops... THe queue's structure would make it hard to deal with this kind of situation.

Since you have information about how close or far away the IPs are then perhaps a priority queue could be used... but it really seems like overkill to me.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1