police45s
asked on
perl and linked lists
I need to write a program which similates a "Rolodex".
Each page should contain the following information:
First_Name Last_Name Phone_Number
The program should be menu driven, with the following options:
1) Add a page,
2) Search for a page by last name,
3) Search for a page by phone number,
4) Remove a page (found by searching by last name).
5) Print out the whole rolodex sorted by last name.
the program must use linked lists. Each page should be represented by a
hash, and the reference to the hash should be stored as the value of a node
in the linked list. When a new node is inserted, it should be inserted into
the list so as to preserve alphabetical ordering.
Each page should contain the following information:
First_Name Last_Name Phone_Number
The program should be menu driven, with the following options:
1) Add a page,
2) Search for a page by last name,
3) Search for a page by phone number,
4) Remove a page (found by searching by last name).
5) Print out the whole rolodex sorted by last name.
the program must use linked lists. Each page should be represented by a
hash, and the reference to the hash should be stored as the value of a node
in the linked list. When a new node is inserted, it should be inserted into
the list so as to preserve alphabetical ordering.
I'd suggest using a database for the backend, DBI with DBD::SQLite, and Class::DBI for the model.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I understand and appreciate your comments, but this is the way that the program must be constructed, with a linked list. I have worked on a single occasion with linked lists but the data that was being passed was just a scalar variable(a number). This linked list is supposed to be created using a hash (for the 3 data fields), and the reference to the hash should be stored as a value of a node in the linked list. This is the problem I'm having and unfortunately I can't get very far into the code unless I can constuct this hash and the reference to the hash. Any help would be appreciated.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
jmcg,
I don't believe I deserve points for this topic, since my recommendation didn't satisfy the OP's requirements.
Good to see you back in cleaning though!
Sometimes I wish we had something of a chat room within this topic area. It would be nice to have a talk with you and the other experts on occasion.
Something I'd like to mention for example (even though it's not relevant to this particular topic) is that I'm in the process of moving to another country (Norway, to be precise) with my wife, so my activities on EE will be rather sporadic over the coming month.
I don't believe I deserve points for this topic, since my recommendation didn't satisfy the OP's requirements.
Good to see you back in cleaning though!
Sometimes I wish we had something of a chat room within this topic area. It would be nice to have a talk with you and the other experts on occasion.
Something I'd like to mention for example (even though it's not relevant to this particular topic) is that I'm in the process of moving to another country (Norway, to be precise) with my wife, so my activities on EE will be rather sporadic over the coming month.