Write a Concurrent Java program which illustrates an emulated training of a football goalkeeper. There is one goalkeeper and 4 players shooting at him. Each is running in a separate thread. The training proceeds as follows:
- The players take turns in shooting. Player 1 starts, followed by Player 2. Next is Player 3 and then Player 4. And they start over again with Player 1, and so on.
- Each player starts the shot by moving to a random location, at which a new ball is created. The player shoots the ball at the goalkeeper, who tries to catch it. The ball is shot with a random speed. The ball is directed towards a random point in the goal.
- The next player may only shoot after either the previous player scores a goal, or the goalkeeper succeeds in catching the ball. In either case, the shot ball disappears. The training continues until your application is terminated by the user. At this point, all threads must be correctly terminated. Your project may be implemented on the command line interface (CLI). #Code Screenshots
#Report GoalKeeper Training Report.pdf