create java program take n values (double) from user,store in array and use overload method to calculate average based on :

1- method take no parameter and calculate average for all values

2- method takes 2 double parameter (m,n) and calculate avg value of all numbers between range m to n

3- method takes string parameter x if x="pos" then calculate positive values,if x="fact" then calculate

average values of factorial values of all positive numbers

use method to print all n values and average values as output

So, what's your question?

its question im trying to do but i cant find the correct solution

What is your difficulty? Do you not understand how to calculate an average? Do you not have any idea how to write a Java program? Are you having trouble with some particular detail of the assignment? There is no one "correct" solution; there are many ways to tackle the problem. And there would be no point in you just copying my particular solution, would there? This is an exercise intended to test your programming skills and to teach you something in the process. So, for starters, show us what you have done so far.

If you don't even know where to start then I would suggest that you need to discuss this with your tutor. Either that or else reconsider whether computer programming is the right course for you.

Ask Your Question

Weekly Poll