Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For this task you will create a class containing a number of methods for processing an array of Speeds, which represents speed of rocket as
For this task you will create a class containing a number of methods for processing an array of Speeds, which represents speed of rocket as it flies to outer space. Each speed is an integer in the range 0 to 100 inclusive. On the Interact site for this project, you have been provided with a class Speed (in Project2 code zipped folder), which has a method getSpeed that generates and returns an array of Speed for you to use in testing. The class ProcessSpeed that you create will have the methods specified below. Most will accept an array of Speed as an argument; one will accept an array of characters. The return type should be appropriate for the returned value. The max, min and range methods will return the maximum speed of the rocket, the minimum speed and the difference between the maximum and minimum speed respectively. The mean and stdDev methods will return the mean and standard deviation of the set of speeds. . The median method will return the median value of the set of speeds. The median value is the middle one when the values are placed in order. To obtain an ordered version of the speed you may use an appropriate sort method of the Java API's Arrays class. Be careful not to destroy the original array of speeds. If there is an even number of speeds, the middle value is taken as the average of the two values that are nearest to the middle. The mode method will return the mode of the set of speeds, which is the most commonly occurring speed. To find the mode, use an ordered version of the set of
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started