I am fairly new to Java and am about to begin a programming course in the next week. I am preparing by completing exercises and am stuck on this particular one.
Basically, i need to read a file in a certain format and calculate some figures and writing the result to another text file.
In dot points:
-read a text file with teh following format
(jobtype, jobname, no_dependent_jobs, depend_job_name, depend_job_name2, etc.)
-I need to calculate stats such as how many jobs are waiting for 'Build' to finish before it can start, number of jobs that can begin immediately etc.
-Write results to a text file.
So far I am able to read and write to a file but I am stuck with the second dot point. How should I go about in calculating the stats of each job. Am i meant to store the data into variables or arrays first? Each row doesn't have a fix format so I couldn't really store it in arrays. I could be completing on the wrong track.
Any advice or assistance is appreciated. Thank you in advance.