NewBee help with HashMaps

Discussion in 'Java' started by psmith@mcwy.com, Feb 25, 2007.

  1. Guest

    Ok - I am really stuck on this. I have managed to create a Hashmap
    that holds student names and will hold scores of coursework, and it
    will finally give them a grade.

    I now have to:

    /**
    * Asks the user to enter the marks for all the students for the given
    tma.
    * It should check that the tma number provided as the argument is
    valid
    * but it can assume that the marks entered by the user are valid.
    */

    I am getting no where - error messages all the time. Can anybody
    point me in the right direction.
    Firstly my two classes are Student and TutorGroup. When I create a
    new TutorGroup (using blueJ) - I can see attribute - students. click
    on students - it shows key (students name) - type java.util.map -
    click on the student and I can see their respective details :
    attribute (name) with its value"Billy"(type string) and attribute
    (tma) with is value 0(int).

    How do I use this line:

    public void enterMarksForTMA(int tma)

    to complete the above.

    I have received no end of error messages. I have tried a keySet but
    have only managed to get it to display Name[0,0]X instead of just
    their name.

    Any help is greatly appreciated.

    Thanks.

    Paul
    , Feb 25, 2007
    #1
    1. Advertising

  2. Oliver Wong Guest

    <> wrote in message
    news:...
    >
    > I am getting no where - error messages all the time. Can anybody
    > point me in the right direction.


    Might be easier if you actually state the error message you are
    receiving.

    - Oliver
    Oliver Wong, Feb 27, 2007
    #2
    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. Maps and Hashmaps

    , May 25, 2004, in forum: Java
    Replies:
    2
    Views:
    2,429
    jAnO!
    May 25, 2004
  2. Marilyn Hart

    Help on Hashmaps

    Marilyn Hart, Jan 22, 2005, in forum: Java
    Replies:
    5
    Views:
    603
    Bjorn Abelli
    Jan 23, 2005
  3. Replies:
    5
    Views:
    418
  4. Replies:
    10
    Views:
    506
    AmiDaniel
    Feb 28, 2007
  5. Replies:
    1
    Views:
    474
    Tom Hawtin
    Mar 11, 2007
Loading...

Share This Page