Help - cross tabulation

Discussion in 'Java' started by reuben.nantogmah@gmail.com, Apr 28, 2005.

  1. Guest

    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
     
    , Apr 28, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. selwyn

    cross-tabulation pointers

    selwyn, Jun 16, 2004, in forum: Python
    Replies:
    2
    Views:
    370
    selwyn
    Jun 17, 2004
  2. Ajith Prasad

    Cross-tabulation module in Python

    Ajith Prasad, Oct 5, 2004, in forum: Python
    Replies:
    0
    Views:
    333
    Ajith Prasad
    Oct 5, 2004
  3. Robert Brewer

    RE: Cross-tabulation module in Python

    Robert Brewer, Oct 5, 2004, in forum: Python
    Replies:
    1
    Views:
    652
    Harry George
    Oct 6, 2004
  4. Robert Brewer

    RE: Cross-tabulation module in Python

    Robert Brewer, Oct 6, 2004, in forum: Python
    Replies:
    0
    Views:
    367
    Robert Brewer
    Oct 6, 2004
  5. chris smith

    Cross tabulation

    chris smith, Nov 25, 2005, in forum: Ruby
    Replies:
    0
    Views:
    95
    chris smith
    Nov 25, 2005
Loading...

Share This Page