Click here to Skip to main content
15,913,215 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Write a multithreaded program that calculates various statistical values for a list of numbers. This 
program will pass a series of numbers on the command line and create three separate worker threads.
One thread will determine the average of the numbers, the second will determine the maximum value,
the third will determine the minimum value, and the fourth will determine standard deviation, median,
and mode. 
For example, suppose your program is passed the integers:
60 78 78 95 79 65 85 45 20
The program will report
The average value is……
The minimum value is…..
The maximum value is ….
The median value is ….The standard deviation is ….
The mode is…………..
The variables representing the average, minimum, and maximum values will be stored globally. The 
worker threads will set these values, and the parent thread will output the values once the workers have 
exited.


What I have tried:

i have tried but didnt know how to write a program in java
Posted
Updated 1-Apr-22 22:14pm

While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.

If you don't know Java, then you need to learn: Addison Wesley, O'Reilly, and others all publish good books on the subject, or go on a course if you can.

If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]
 
Share this answer
 
If you do not know how to write a program in Java then why are you trying to write a multi-threaded one? I suggest you go to Java Tutorials Learning Paths[^] and learn the language thoroughly.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900