/Java-IO-min-max-avg

Using the File and BufferedReader and Writer classes to perform simple calculations on a String of numbers that are converted to an integer array.

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

Java-IO-min-max-avg

The aim of this project is to demonstrate retrieving data stored in a text file, performing an operation on that data and writting the results to another text file.

Description

Data is read from input.txt where an operation (minimum, maximum, average, percentile) is followed by numbers with which to perform the operation on. Each operation has a respective method. Each line of data is read from the file, parsed into an integer array and its result written to output.txt.

Example excerpt

Input

P90: 1,2,3,4,5,6,7,8,9,10

Output

The 90th percentile of [1,2,3,4,5,6,7,8,9,10] is 9.

Dependencies

  • java.io* (for FileReader and FileWriter objects)
  • java.util.Arrays (for toString method)
  • input.txt
  • output.txt

Author

Nadia Schmidtke Email me

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE.