Global Superstore 4
Prerequisite: You wrote the solution for part 3.
Goal: Modify your threads to invoke FutureTasks
.
Task 1
The run()
method inside a Runnable
is void
. If you need to return a value:
-
use
Callable
because itscall()
method returns a value. -
Modify your threads to invoke
FutureTasks
instead ofRunnables
. Then, use theget()
method to retrieve the value from each task.
>>: Please enter your name to access the Global Superstore dataset: Rayan
>>: Thank you Rayan. The average sales for Global Superstore are:
>>: Average Furniture Sales: 9799.21280813723
>>: Average Technology Sales: 9854.096986549781
>>: Average Office Supplies Sales: 9540.319577001303
>>: Total Average: 9651.778039610392
Good Luck!
Feedback Summary
4.7
43 students
5
91%
4
2%
3
0%
2
0%
1
7%
Written Reviews
There are no written reviews yet.