Project5
- Due Dec 1, 2017 by 11am
- Points 30
- Submitting on paper
- Available Nov 17, 2017 at 12am - Dec 1, 2017 at 11:59pm
Programming Project # 5– Arrays, Files, and Sorting (30 points)
Create an input text file that has the name input.txt with the following content.
10 45 23 14 76 55 14 34 11 4 12
Your mission, is to write a console program which does the following.
- Open and read the first line of this input file and create an integer array with a size to match the first number of the file. So if the first line of the file contains 10, the array will have 10 slots. Read the remaining numbers into the array.
- Write a method named sort, which takes the array as a parameter, and sorts it from low to high. When the sort is complete, create an output file with the name output.txt and write the output. The size will be first, followed by the sorted list of numbers (one per line).