Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2007

Tip: Looking for answers? Try searching our database.

NewBee help with HashMaps

Thread view: 
psmith@mcwy.com - 25 Feb 2007 19:08 GMT
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
Oliver Wong - 27 Feb 2007 15:55 GMT
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.