subject

Write a program that accepts a file name from command line, then initializes an array with test data using that text file as an input. The file should contain floating point numbers (use double data type). The program should also have the following methods:* getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array.* getAverage. This method should accept a one-dimensional array as its argument and return the average of the values in the array.* getHighest. This method should accept a one-dimensional array as its argument and return the highest value in the array.* getLowest. This method should accept a one-dimensional array as its argument and return the lowest value in the array.(I NEED JAVA CODE)output should be like thisdouble_input1.txtTotal: -1,813.080\nAverage: -18.131\nHighest: 985.007\nLowest: -989.128\ndouble_input2.txtotal: -331,368.178\nAverage: -165.684\nHighest: 9,994.439\nLowest: -9,988.269\ndouble_input3.txtFile: double_input3.txt does not exist.\nUsage: java ArrayOperations

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:30
Some of the first computer games were created in the early 1970s by college students experimenting after hours to see what the were capable of doing.
Answers: 3
question
Computers and Technology, 23.06.2019 00:30
Write the html code to make a link out of the text “all about puppies”. it should link to a pdf called “puppies.pdf” inside the “documents” folder. the pdf should open in a new window.
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
1. which of the following is not an example of an objective question? a. multiple choice. b. essay. c. true/false. d. matching 2. why is it important to recognize the key word in the essay question? a. it will provide the answer to the essay. b. it will show you a friend's answer. c. it will provide you time to look for the answer. d. it will guide you on which kind of answer is required.
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
Of the following pieces of information in a document, for which would you most likely insert a mail merge field?
Answers: 3
You know the right answer?
Write a program that accepts a file name from command line, then initializes an array with test data...
Questions
question
Geography, 30.09.2019 19:40
Questions on the website: 13722362