Write a program to use some of the methods to read in an unknown number of integers from a file, then print them out 8 per line to a file.

Then use a method to find the location of the largest value and the location of the smallest value.

You will need to write a main method and 4 other methods, used exact method from slide 28 to read them in, modify method from slide 35 to print 8 per line(modified similar to slide 34 to print to a file), and the exact method from slide 40 to find the location of the largest value, then copy and modify that method to fine the location of the smallest value.

Allow for a maximum of 100 values in the array, declare the array, input file and output file in main.

Data file will be dataTest.txt

Create your own data file using a text-editor and test your program, when you think you are ready, email me for my data file.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

import java.util.Scanner;

public class ReadData {
    * Main method
    public static void main(String[] args) throws FileNotFoundException {
       int MAX = 100;
       int[] array = new in...

By purchasing this solution you'll be able to access the following files:, dataTest.txt and dataOutput.txt.

for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats