Question: Parallel version 1 (Name this file as Q1_PLV1.java): o Repeat the sequential version using two threads along with the main thread. o Each thread creates

Parallel version 1 (Name this file as Q1_PLV1.java):

o Repeat the sequential version using two threads along with the main thread. o Each thread creates a list of 25,000 students with randomly generated GPAs, randomly generated Ages, and sequential IDs. o Each of the two threads then calculates the average GPA and AGE (after creating the lists). o The two threads work in parallel. o The main thread waits for the two threads to finish and then calculates and prints the final average GPA and AGE from what

is reported by the individual threads. Parallel version 2 (Name this file as Q1_PLV2.java):

o Repeat the Parallel version1 task using five threads (each is working on 10000 students) along with the main thread. To measure the time your computer takes to complete a certain task:

Read and store the current time (t1) before you start the task (e.g., before creating the lists), After the task (e.g., after calculating the average), read and store the current time (t2). The time it takes your computer to complete the task is then: t2 t1.

I need correct code and output for both parts of this queation

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!