NumericAnalyzer will accept a list of 1 or more numbers as command line arguments . NOTE: Don’t prompt the user for input – this is an exercise passing values to your program via the command line!...



  • NumericAnalyzer will accept

    a list of 1 or more numbers as command line arguments
    .




NOTE: Don’t prompt the user for input – this is an exercise passing values to your program via the command line!  We’re forcing the user to “push” data values to the application rather than “pull” it from the user!





  • Error checking:

    • if the user fails to pass in parameters, the program will display an error message (of your choice) and exit early.

    • EXTRA CREDIT (+5) Data Validation – flag non-numeric parameters as “invalid data” and exit early.



  • The main() method’s String [] args argument values must be converted and assigned to a numeric/integer array and passed to an instance of NumericAnalyzer. (SEE EXAMPLE main() IMPLEMENTATION BELOW).
    main() should also be responsible for error checking logic.


  • Your program will display the following information about the numbers provided by the user:




    1. The set of numbers provided by the user sorted ascendingly.

      NOTE: DO NOT implement your own sort algorithm!

      Part of this assignment is to begin discovering functionality provided by Core Java.

      Here’s a good place to start:
      https://www.geeksforgeeks.org/arrays-sort-in-java-with-examples/




    2. The size of number list (the number of numbers!)




    3. The average or mean





    4. The median - the middle ‘value’ of the set of numbers sorted. Specific Definition:



      • Case 1 – odd set of numbers:


        • Median is the middle value.




      • Case 2 – even set of numbers:


        • Median is the average of the middle 2 values





















Odd Sized Example



2 3 4 8 12 16 32 =
8


          ^




Even Sized Example



1 3 4 12 16 32   =4 + 12 = 16 / 2 = 8
       ^  ^







  1. The min value.




  2. The max value.




  3. The sum





  4. The range: the difference between the max and min




  5. Variance:
    Subtract the mean from each value in the list. This gives you a measure of the distance of each value from the mean. Square each of these distances (and they’ll all be positive values), add all of the squares together, and divide that sum by the number of values (that is, take the average of these squared values) .




  6. Standard Deviation:
    is simply the square root of the variance.









Development / solution guidelines:


The output should be neat, formatted and well organized – should be easy on the eyes (see sample output below).
Just as with lab 1, follow through the link below to reference “printf()” method usage in Java.

Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here