2 Replies - 440 Views - Last Post: 08 September 2011 - 07:11 PM Rate Topic: -----

#1 thewalker  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-September 11

Any help how to use hashmap on my flight reservation program?

Posted 08 September 2011 - 04:16 AM

Hi there, i am trying to use hashmap on my flight reservation program. I am not much confidence about you. Any suggestion would be much appreciated. Cheers
Is This A Good Question/Topic? 0
  • +

Replies To: Any help how to use hashmap on my flight reservation program?

#2 farrell2k  Icon User is offline

  • 1.21 Jiggawatts!
  • member icon

Reputation: 566
  • View blog
  • Posts: 1,736
  • Joined: 29-July 11

Re: Any help how to use hashmap on my flight reservation program?

Posted 08 September 2011 - 09:34 AM

You could do something like store a customer's name in a key, then a customer number in a value.

There are many people here who can help, but we need more info, please.
Was This Post Helpful? 0
  • +
  • -

#3 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8032
  • View blog
  • Posts: 31,202
  • Joined: 06-March 08

Re: Any help how to use hashmap on my flight reservation program?

Posted 08 September 2011 - 07:11 PM

I suspect that two John Smith might be on the same flight, especially if it is a 747 or a A380. And what will you do with 500 different passenger names in your HashMap.

I would rather use the seat number as a key and the passenger name as value. That will garanty only one passenger per seat.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1