Write a java program.
Let's make a thread race program, where a ThreadRace class will create an instance of 10
ThreadRaceCompetitor's. Then it'll run them all. Inside ThreadRaceCompetitor class, you
should use, for example, Thread.sleep(generator.nextInt( 3000 )); to random the ability of
each competitor. There will be also a results class called ThreadRaceContext, which will
keep the scorecard of who finished in which place.
When a ThreadCompetitor finishes the race, it will have to inform the
ThreadRaceContext his race number, and that it's done, so the ThreadRaceContext will
inform about its arrival. Who'll arrive first? Make your bets!
This is a question. make a thread race program.
No, that's an assignment.
Nice try, but this isn't a homework service. Do your own work. See the link in my signature on asking smart questions.
Originally Posted by jjjkkk