Question: can someone please give me the correct solution in Java programming language please (PUICJ. 00/100) The student has to develop FactorialCalculator, a multi-threaded Java program

can someone please give me the correct solution in Java programming language please
can someone please give me the correct solution in Java programming language
please (PUICJ. 00/100) The student has to develop FactorialCalculator, a multi-threaded Java

(PUICJ. 00/100) The student has to develop FactorialCalculator, a multi-threaded Java program which computes the factorial of a given number n (n21). The factorial of a positive integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example, 5! = 1 x 2 x 3 x 4 x 5 = 120. The student has to structure the program according to the following guidelines. Given (in the main program) the integer n (>=1) . the integer numOfThreads (>=1) the multi-threaded Java program computes n! and returns the computed value in output. The task must be performed in concurrency, by splitting the original task in (as balanced as possible) numOfThreads sub-tasks, each one performed by a thread. Implement the code, such that it works for generic values of n and numOfThreads. The output of the program must be generated following the example output reported below (example for n=11 and numofThreads=3): Computation of 11! using 3 threads. Thread-2 [7,11] started... Thread-1 [4,6] started... ... Thread-2 [7,11] completed (Local Factorial: 55440) ...Thread-1 [4,6] completed (Local Factorial: 120) Thread-o [1,3] started... ...Thread-o [1,3] completed (Local Factorial: 6) Final Result: 11! = 39916800 (PUICJ. 00/100) The student has to develop FactorialCalculator, a multi-threaded Java program which computes the factorial of a given number n (n21). The factorial of a positive integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example, 5! = 1 x 2 x 3 x 4 x 5 = 120. The student has to structure the program according to the following guidelines. Given (in the main program) the integer n (>=1) . the integer numOfThreads (>=1) the multi-threaded Java program computes n! and returns the computed value in output. The task must be performed in concurrency, by splitting the original task in (as balanced as possible) numOfThreads sub-tasks, each one performed by a thread. Implement the code, such that it works for generic values of n and numOfThreads. The output of the program must be generated following the example output reported below (example for n=11 and numofThreads=3): Computation of 11! using 3 threads. Thread-2 [7,11] started... Thread-1 [4,6] started... ... Thread-2 [7,11] completed (Local Factorial: 55440) ...Thread-1 [4,6] completed (Local Factorial: 120) Thread-o [1,3] started... ...Thread-o [1,3] completed (Local Factorial: 6) Final Result: 11! = 39916800

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!