| Your sorting routine seems weird to me. I don't have a java compiler (and haven't used java in 10 years, but it's similar enough to C# that I can read the code still) installed so I can't test it but:
1. Working on an array of Student objects inside of a Student object is definitely not kosher. The sorting() method should belong to the Tests object just like sort_names() does.
2. You're comparing temp2 values, not actual test scores. Again, just by reading the code, temp2 appears to just be a variable you store the quiz number they want sorted by. If it was my project, I would get rid of q1 through q6 and make int q[6]; instead. That way you could reference q[tempint] instead of using temp2 at all (which allows you to lose temp2 entirely as well).
3. Your loop at the end prints out the same thing 10 times because you use this instead of x[q].
Last edited by Vorph : 04-18-2006 at 08:28 PM.
|