Question: Write a Java program that reads input in from a text file and saves it to different arrays or arrayLists (or preferred storing) . There

Write a Java program that reads input in from a text file and saves it to different arrays or arrayLists (or preferred storing). There will be 4 arrays and one 2D array. The data on the line with the % should be used as a marker to transition to the next array while the word or letter directly next to the % can be ignored.

The text file will look as follows:

% Q - all states

% Sigma - alphabet

% F final states

% Q0 initial state

% Delta transitions (2D array needed)

Write a Java program that reads input in from a text file

1 % Q 2 B 3 4 D 5 6 E 7 F G 8 9 . I 10 11 12 % Sigma 13 14 15 1 % F B 16 17 18 19 20 C D E 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 . I % QO A % Delta AOB A1c BOB B1E COD Cic DOB D1G E OF E1C FOB F11 GOH G1C HOB H 1 ) I OJ I 10 JOJ J 10 36 37 38 39 40 41 42 43 44 45

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 Databases Questions!