My program starts with user entering rainfall amount.
Then sorting the array in descending order a using selection sort algorithm.
Then displaying the result
Then use a binary search algorithm to find a rainfall amount entered by a user
My question is how do you connect the user's input rainfall with the month associated? And how do I find the rainfall amount entered by the user?
2. Why do you swap only rain rather than entire Data objects on lines 67-69?
3. Find the index of the Data object, whose member rain equals the user given value.
* Why rain is in double, but user gives an int?
* Assume that user can give a value that does not exist in the array, i.e. search can return "invalid index".
* There is no easy "equals" for doubles.