Question: JAVA Programming: Simulate 10 runners (threads), these runners sleep a random amount of time drawn from numbers between 500ms - 1000ms, upon waking up runners

JAVA Programming:

Simulate 10 runners (threads), these runners sleep a random amount of time drawn from numbers between 500ms - 1000ms, upon waking up runners run a random distance between 5 - 10 mtrs and then go back to sleep by choosing a random sleeping intervals, (a number between 500ms - 1000ms). The one finishes 100 mtrs first is the winner. In our output you should show how much they run whenever they wakeup and rank them based on shortest time to 100 mtrs upon all the runners complete the race.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!