You must be able to read from a text file regardless of its layout or structure eg an “irregular text file” has a variable number of data items per row of data in the text file. From 2022 text files are also likely to contain date/time information.

Here is a presentation download that explains how to do this using a 6 class program as an example.

Click here for presentation.

Click here for all the code. Download and open with Notepad.

Six Classes – The UI class, the prison manager class, the prison class, the prisoner(convict) class, the guard class and the vehicle class.

There are 8 different formats a text file can take – click here for more