help needed with linked list code

Dec 11 2009 11:26 AM
i have to write this linked list program and i dont even know how to write the nodes....or the program

it says:
1st part:
define a structure that represents family linked list information each family has three components:husband,wife and children.as the number of children varies from family to family,the children are represented by a list that is capable of accomodating any number of items .each person is in turn represented by a structure of four components:name,surname,date of birth,and job.the job information is "unemployed" or it specifies the working organization and salary.


the 2nd part of it

assume that a simple(one way) list is already populated with a set of families,and a global pointer list points to the first node of the list.
write a program to answer the following queries:
1.find the name of all the "unemployed "people.
2.find all the children born in 2000
3.find all names with salary s,where 1000<=s<=2000
4-find whether x is a wife.
5.find whether x is a child.


all i did was writing a node of family and another of family member....couldnt do the job node or the children node
anybody could help pleaaaaaaaaaase um lost




i dont want the whole problem done......any help would be usefull even just the begging of the problem cuz um lost and i dunno anything
the only part i did was this(i dont think it's even right )
insert

record member {
member next
string firstName
string surname
int birthdate
integer age
}
record family {
family next
string husband
string wife
string children
member members /
}
and i wrote the whole problem so that people who could help can know what um talking about



Answers (12)