Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > NewBee help with HashMaps

Reply
Thread Tools

NewBee help with HashMaps

 
 
psmith@mcwy.com
Guest
Posts: n/a
 
      02-25-2007
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

 
Reply With Quote
 
 
 
 
Oliver Wong
Guest
Posts: n/a
 
      02-27-2007
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ps.com...
>
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NewBee: HashMaps and an Array psmith@mcwy.com Java 1 03-11-2007 09:39 PM
NewBee help with HashMaps - extra psmith@mcwy.com Java 10 02-28-2007 04:01 AM
NewBee help with HashMaps psmith@mcwy.com Java 5 02-25-2007 11:15 AM
Help on Hashmaps Marilyn Hart Java 5 01-23-2005 03:51 AM
Maps and Hashmaps neelu111@hotmail.com Java 2 05-25-2004 01:47 PM



Advertisments