HI everyone, I am working on an application to help students in our university register units(well don't mind units, something like subjects to be undertaken in a particular semester) on-line.Now I have everything working up to the point of registration so definitely it would be a good idea to tell the student of not only the successful unit registration but also list the successfully registered units.During the registration, the students input is a line containing the following information

needs, so I call the function and passes the parameters to it, and the rest is up to me.Now here is what you might be up to,Apparently the function registerUnits( ) { } does everything right and now I have to tell the student that the unit registration was successful.I can easily do that, with ...

then i would append the registeredUnits to the message that I would tell the student

Code:

System.out.println("You successfully registered the units: "+registeredUnits+".Thanks for using this service.");

But like I said the output of the above isn't the best several modifications have just appended either the first unit (unitCodes[ 0 ]") or the first and the last (unitCodes[unitCodes.length]) units to the output,which isn't encouraging to a young programmer.Anyone with a better idea on how I would go about this?

11-21-2009, 05:47 PM

ocean

Oo you double posted =) Still missing { } on the loop =) dont you?

11-22-2009, 06:24 PM

Eranga

Please don't post the same question more than once next time, even in different sub-forums.