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, 23.06.2019 00:10
My has been slow anyone else’s ?
Answers: 1
question
Computers and Technology, 23.06.2019 21:40
language consists of basic components, and they are called a. 3; mental images, concepts, and speech b. 2; language acquisition and linguistic relativity c. 3; heuristics, algorithms, and analogies d. 4; phonemes, morphemes, syntax, and semantics e. 2; words and grammar
Answers: 3
question
Computers and Technology, 24.06.2019 19:50
Which is a characteristic of free and open-source software licenses? a. the source code is unavailable to everyone b. the source code is available only to the government c. the source code is available to all users d. the source code is constantly modified
Answers: 1
question
Computers and Technology, 25.06.2019 08:20
Which of the following statements is true of offshore outsourcing? a. improved telecommunication systems have increased its attractiveness.b. the limited availability of the internet has reduced its effectiveness.c. reduced bandwidth has increased its efficiency to perform with low latency.d. the increased cost of communication has reduced its popularity.
Answers: 1
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
Computers and Technology, 02.07.2019 15:40
Questions on the website: 13722367