Implement the getTask method. It should return a Callable object. The Callable object must calculate the sum of the numbers from 1 to the passed number (i), inclusive, and return it as a String. The main method is not tested.
Plants vs Zombies
1. Read about java.util.concurrent.Phaser. 2. Put the methods in the right places: - arriveAndDeregister(): starts calling the tasks' run methods, - arriveAndAwaitAdvance(): waits for all threads to be created.
The ReadWriteMap class must correctly provide access to a Map object across multiple threads, but mistakes were made during implementation. Find them and fix them.
The FactorialCalculator class is designed to calculate the factorial of a number passed to its constructor as an argument. Unfortunately, it is not implemented correctly and you need to fix it. Carefully analyze the Solution class's main method.