I have a text file that can store up to 3 lines (each line has time ##:##).
If the entire text file is empty : do task 1
else if the first line has a time: do task 2
else if the first and second line are filled with times: do task 3
else if all three lines have times: do task 4
else if all three lines have time but the first line time and the third line time have more than 2 hour gap: do task 5
I have figured out the first two.
if ((inputFile.readLine()) == null) {Keypad5 task1 = new Keypad5(); }
else if ((inputFile.readLine()) !=null) {Keypad6 task2 = new Keypad6();}
How I can read and the second and third lines? And if second line has time 12:54, and third line has 3:55, this is more than 2 hour gap. I can subtract the times probably.