Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement a runnable Class called NumericAnalyzer. Heres the functional behavior that must be implemented. NumericAnalyzer will accept a list of 1 or more numbers as

Implement a runnable Class called NumericAnalyzer. Heres the functional behavior that must be implemented.

NumericAnalyzer will accept a list of 1 or more numbers as command line arguments. The provided list of numbers does not need to be ordered (although youll need to display the list of numbers sorted ascendingly).

NOTE: Dont prompt the user for input this is an exercise passing values to your program via the command line!

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

The main() methods String [] args argument values must be converted and assigned to a numeric/integer array.

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

This list of numbers provided by the user sorted ascendingly.

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

The average or mean value.

The median - the middle value of the set of numbers sorted. (Simple Algorithm: index = the length of the array divided by 2).

The min value.

The max value.

The sum

The range: the difference between the max and min

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 theyll 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) .

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

Development guidelines:

The output should be neat, formatted and well organized should not hurt your eyes!

Your main() methods actions should be limited to:

gathering command line arguments

displaying error messages

creating an instance of NumericAnalyzer and invoking its top level method (e.g., calculate(), display() )

Your code should adhere to naming conventions as discussed in class.

Your implementation should embrace modularity:

Each mathematical calculation should probably be implemented by a separate method.

Yet another method should be responsible for displaying a sorted list of the numbers provided, and displaying all derived values above.

NOTE: Deriving calculations and displaying output to a Console are separate threads of responsibility, and should therefore be implemented independently of each other.

Your implementation should embrace using core Java modules:

Use the java.lang.Math Class methods to calculate square roots and perform power-to values.

the display should look like that:

10 11 11 11 12 13 14 16 17 18 18 54 55 100

Size: 14

Min: 10

Max: 100

Range: 90

Sum: 360

Mean: 25

Median: 16

Variance: 632

Standard Deviation: 25

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions

Question

Complexity of linear search is O ( n ) . Your answer: True False

Answered: 1 week ago