R
reuben.nantogmah
Hi,
I need advise re the best data structure to use for representing data
in aggregated form. I am looking to do something like this
Year 1 Year 2
number percent number percent ...
MAJ 66 0.0 61 0.0 ...
GRAD 0 0.0 0 0.0 ...
NOTA 0 0.0 3 0.0 ...
TOTAL 66 100.0 66 100.0 ...
The example shown above is my output from a current program. I will not
include it here because I don't want bring too much focus to the
program itself. The problem is that I can't get the percent values to
come out correctly although the number part is right. I really don't
know what else to do after two days of looking at this code. The
question is, what data structure is best suited to do this type of
work. I tried using a hashtable [] where each hash table in the array
held data for one group. So for the data above I would have five
hashtables in the array each holding Maj, Grad, Nota and Total data
items as keys. The value part is a class that has number and percent
along with some other details.
Any help will be much appreciated. Please let me know if it is helpful
for you to see the code so far.
-Reuben
I need advise re the best data structure to use for representing data
in aggregated form. I am looking to do something like this
Year 1 Year 2
number percent number percent ...
MAJ 66 0.0 61 0.0 ...
GRAD 0 0.0 0 0.0 ...
NOTA 0 0.0 3 0.0 ...
TOTAL 66 100.0 66 100.0 ...
The example shown above is my output from a current program. I will not
include it here because I don't want bring too much focus to the
program itself. The problem is that I can't get the percent values to
come out correctly although the number part is right. I really don't
know what else to do after two days of looking at this code. The
question is, what data structure is best suited to do this type of
work. I tried using a hashtable [] where each hash table in the array
held data for one group. So for the data above I would have five
hashtables in the array each holding Maj, Grad, Nota and Total data
items as keys. The value part is a class that has number and percent
along with some other details.
Any help will be much appreciated. Please let me know if it is helpful
for you to see the code so far.
-Reuben