1.) This question has a lot you may get some better results by breaking ito down into simpler tasks
2.) I recommend that you activate your E-mail in your account. I & others maybe able to give you more detailed info and files if necessary
Answers:
Your data( a.k.a. Record) for each individual is FirstName & Age. It is possible that you will have duplicate names like John or Bob entered.
You can enter record data (Name, Age) into a single Multiple Element Array or several Single element arrays. Multi Element arrays use several index values myArray(index1, index2) index2 would only be of the vaules 0 & 1 where 0 would be used for the name and 1 would be used for the Age. Index1 would be used with a counter and would provide a unique number for each record entered.
so:
myArray(1,0) = 'Bob'
myArray(1,1) = 23
Single element arrays have only one index element but you need several arrays (2 in this case) to hold your data fields . Each array will share the same index value for each record added.
So the first part of your program will be to load user input into the arrays and then print it back. This is unsorted data both input and output but is a first step you will need to accomplish in order to create the rest of the program.
I would recommend using three single element arrays:
arrayName(index) string
arrayAge(index) integer
arrayIndex(index) integer
The index array will store index values which will be used to read the other two arrays. Later when sorting your data you can rearrange the list of index values in the array so as to print out the randomly entered data in a sorted fashon.
But for now you can just use the arrayName and arrayAge arrays
EDIT:
I tried to respond to your email by Yahoo mailer returns it as an undeliverable E-mail. I seem to have a Yahoo mailer issue sending mail. anyway here is my response to your email.
following single element arrays arrays use the same index value to relate the individual data fields to a record. In other words the index value identifies a specific record entered. Each record will be comprised of a name and an age, I preface the array name with ay to indicate to me that it is an array.
DIM ayName() as string
DIM ayAge as integer
DIM ayIndex as integer
redim ayName(100)
redim ayAge(100)
redim ayIndex(100)
The above declares the arrays as specific data types and then dimensions the array sizes so as to hold upto 101 records. The array index values start at zero so 0 to 100 gives you 101 seperate records.
assume that I have entered several records via input boxes , so the contents of these arrays will be
ayName(0) = 'Mark' ayAge(0) = 22 ayIndex(0) = 0
ayName(1) = 'Tom' ayAge(1) = 30 ayIndex(1) = 1
ayName(2) = 'Bill' ayAge(2) = 40 ayIndex(2) = 2
The index array is used to present the data from the other arrays. By sequencing through the ayIndex array you get the index value to use in the other two arrays to get the data
So with the above index array values you will print out the entered data stored in ayName and ayAge in the order they were entered into the PC.
By sorting the Name array the index array values can be reorded so as to printout the data in a different order (i.e. sorted by Name)
ayIndex(0) = 2
ayIndex(1) = 0
ayIndex(2) = 1
This is the concept of using an index array to extract data from other arrays in different orders.
Like I said in the answer the first step in your program is to ask for and record data into an array. Worrya about the actual sorting later. This should be enough to give you an idea on how to store the data so it can be recalled in any order via the index array.