Cross tabulation - someone please help if you can
- From: "rn29" <reuben.nantogmah@xxxxxxxxx>
- Date: 28 Apr 2005 11:23:16 -0700
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
.
- Follow-Ups:
- Re: Cross tabulation - someone please help if you can
- From: Ross Bamford
- Re: Cross tabulation - someone please help if you can
- Prev by Date: OutOfMemory on Sun Java 1.4.2 on Linux
- Next by Date: Re: Java Swing
- Previous by thread: OutOfMemory on Sun Java 1.4.2 on Linux
- Next by thread: Re: Cross tabulation - someone please help if you can
- Index(es):
Relevant Pages
|