Question: Write a program in java Lang called CalcHomes.java that will contain several methods. Your program will have several parallel arrays in the main method which

Write a program in java Lang called CalcHomes.java that will contain several methods. Your program will have several parallel arrays in the main method which you will use in the program. The data in the array is related to the other arrays by their position in the array. The program will contain several methods. The main method will contain the following arrays: 1. Call the calcAverage() method then passing it the double array of square footage and print out the results. 2. Call the calcAverage() method then passing it the double array of assessed price and print out the results. 3. Call the locateHighest() method then passing it the double array of assessed price and print the results. 3. Call the locatelowest() method then passing it the double array of distance and print the results. 4. Call the locateHighestValues() method then passing it the String array of house locations and the double array of square footage and print the results. (Hint: You will need to use an enhanced for loop to print out the values from the array.) 5. Call the locateLowestValues() method then passing it the String array of house locations and the double array of distance and print the results. (Hint: You will need to use an enhanced for loop to print out the values from the array.) 6. Ask the user to input an address location 7. Call the confirmHome Location() then passing it the String array of locations and the given location and print the results. 8. All outputs should be rounded to four decimal spaces using printf(). 1st method, calcAverage(), calculates the average from all the values in the double array passed into the method. This method passes in a double array and returns the double average. 2nd method, locateHighest(), searches the double array passed in to find the highest value from the array This method passes in a double array and returns the double highest value found in the array. 300 method, locatelowest(), searches the double array passed in to find the lowest value from the array This method passes in a double array and returns the double lowest value found in the array. 4th method, locate HighestValues(), passes in a String array of house locations and a double array. It will search through the double array to find the three highest values in the double array. It will return a String array that contains the house location of the houses associated with the highest three double values in the double array. 5th method, locatelowestValues (), passes in a String array of house locations and a double array. It will search through the double array to find the three lowest values in the double array. It will return a String array that contains the house location of the houses associated with the lowest three double values in the double array. 6th method, confirmHomeLocation(), will verify if a given String is a valid house location within a certain location. This method passes in the String array of house locations and the location being searched for. The method returns a boolean value of true or false based on whether the location was found within the house location array. If the house location is in the array, the method will return a value of true, and, if the location is not in the array, the method will return false. Hint, the locations must match exactly for the method to return true
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
