Question
Java Threads/Multithreading Create an application which simulates the running race of 400 meters. Create five thread groups and give names (Country names). The number of
Java Threads/Multithreading
Create an application which simulates the running race of 400 meters.
Create five thread groups and give names (Country names).
The number of runners should be ten (two in each group) and give names to each runner thread.
Each thread should run exactly half the distance-200m and the next thread in same group should join the race to complete it.
Print the winner group name() and all the threads should complete the threads should complete the race.
Print the time taken by each Group to complete the race and highlight the Winners time. MUST BE IN JAVA
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started