Hello,
I am trying to create a program that is just like a Process Table.
I have to implement a class PCB (Process Control Block) with several fields such as:
process name (a string)
process priority (an integer)
register set values (an object of a class Register Set containing the following fields: XAR, XDI, XDO, PC.
Then my program needs to then create a Process Table data structure as either an array (max size 100 elements) or an arraylist of type PCB, and initialize the array with data from the file "processes1.txt" Then the Process Table arrraylist has to print out its contents by each process.
So my questions are:
1. How many programs/classes do I have to write? Is it 3. The first program that creates the Process Table arraylist of PCB. The 2nd class would be the PCB class that defines the PCB fields.
2. How would the first program initialize the arraylist with the data from the text file?
3. Could I use an ArrayList of an ArrayList? and how would I do that?
Thank you in advance.