// // This class implements a Process for the simulation // // A process has two parameters: // the process duration, timeLeft; // the process name, procName. // class Proc { private int timeLeft; private String procName; private float creationTime; // Constructor for Proc class. // Requires the process duration and a process name // The creation time is read directly from the Clock thread. Proc(int time, String name) { timeLeft = time; procName = name; creationTime = Clock.getTime(); } // Accesor method to read the time of process creation public float getCreation() { return creationTime; } // Accesor method to read timeLeft public int getTime() { return timeLeft; } // Accesor method to modify timeLeft public void setTime(int newTime) { timeLeft = newTime; } // Accesor method to read procName public String getName() { return procName; } }