Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with a Java programming assignment
#1
[COLOR="Red"]Hi guys, I'm having troubles.

http://pastie.org/728471

That is the code.

array1 is a template class with 30 people in it.
array is a template class with 8 vehicles in it.

What I want accomplished is that 8 random people's ids (an attribute of the People template class) are given a car.

What i have correct is that there are always 8 random people's id's chosen. The countV is also increased to 8.

What I'm having troubles with is always displaying 8 winners. More often than not, only 7 winners' names are shown. Sometimes 8, sometimes 6, once or twice 5.

Now, what is going wrong, and how can i always make 8 people's first names show up?

[/COLOR]
Reply


Messages In This Thread
Need help with a Java programming assignment - by Cyadd - 2009-12-04, 09:14 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)