Question: The data inside divide.in is as followsthe tab spacing between the two numbers 45 6 67 8 124 9 89 6 Complete the code on

213 14 >TestFileProcess2.java 15 >TestFileProcess3.java 16 JRE System Library [jre] divide.in 17

The data inside divide.in is as follows,the tab spacing between the two numbers

45 6
67 8
124 9
89 6

Complete the code on the image according to the requirements of the image. Apply to IO to read data and output the array

213 14 >TestFileProcess2.java 15 >TestFileProcess3.java 16 JRE System Library [jre] divide.in 17 18 int index=0; 19 divide - Notep... 20 File Edit Format 21 45 6 22 678 23 c) Reading Data From Text File and Storing it into Object of Arrays Create TestFileProcess3.java to read from input file and storing its content into object of array as shown in Figure 3. Packa... Projec... 3 FileProcessProject FileProcess > Divide.java >TestFileProcess1.java 124 9 TestFileProcess3.java 10 public class TestFileProcess3 { 11 12- public static void main(String[] args) throws FileNotFoundException { // TODO Auto-generated method stub Scanner inFile = new Scanner (new FileReader("divide. in")); Divide[] arrayInFile = //index arrayInfile [0] arrayInfile[1] for (index=0; index < arrayInFile.length; index++) arrayInFile[ index = 0; while (inFile.hasNextLine()) 89 6 24 { 25 arrayInFile[index].set 26 27 28 index++; 29 } 30 31 32 33 34 35 36 37 38 39 40 41 arrayInFile[index].set //round 1: arrayInFile[0]. //round 1: arrayInFile[0]. //round 2: index = 1 arrayInFile[1].x = 67 inFile.close(); //Like Closing db and free space memory //Print all array x and y //you can apply processing algorithms System.out.println("Printing Array of Object"); for (index=0; index < arrayInFile.length; index++) System.out.println("x = " +arrayInFile [index]. +" y="+arrayInFile [index].g - +"Division is " + arrayInFile[index].getX()/arrayInFile [index].getY()); 42 43} 44 Problems @Javadoc Declaration Console Progress TestFileProcess3 [Java Application] C:\eclipse\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507\jre\bin\javaw.exe Printing Array of object x = 45.0 y 6.0 Division is 7.5 = x = 67.0 v = 8.0 Division is 8.375 Figure 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!