HOMEWORK COSC 231 Distributed: 8 April 2015 Due: 15 April 2015 Write a multithreaded app in Java. There will be the main thread and three "worker" threads. Each worker thread creates its own data: a random 1D array, size 100. Each array contains randomly generated int values (between 0 and 99). Each worker thread finds the max value and the index of the max value. The three worker threads are working concurrently. You must force interleaving with Thread.yield() (or Thread.sleep(1) during debugging). The main program creates each worker thread, then waits until all three workers are finished. Because main is explicitly waiting for each thread to complete, the worker threads should be given a name. public static void main (String args[]) { . . . thread1.join(); // main blocks here until thread1 completes thread2.join(); // wait for thread2 thread3.join(); // wait for thread3 . . . } After the worker threads are completed, main uses each thread's reader method(s) to get the max value and the max location from each thread. The main thread will output each thread's max value and max location. Hints: Make use of http://emunix.emich.edu/~haynes/231/wi14/Code/ThreeThreads.java for a very simple structure for main plus three threads. Make use of http://emunix.emich.edu/~haynes/231/wi14/Code/TenThreads.java to see reader method provided by worker thread. Note: Because main and workers do not share memory (data), then deadlock is not an issue.