Using these functions, implement the following functions in the adapter class SquareAdapter
Demonstrate this functionality by coding main() as follows: ask the user for the size of a square, declare a square of the user-specified size, draw the square; then ask the user for a new size, resize the square to the new size and redraw it.
Each process should have a unique identifier (Hint: maintain a static variable in class Process to keep track of the next available identifier, then increment the identifier once a new process is created.) The states should also implement a reporting function outputting what state the process is in. The process should be able to output:
process 1 is runningIf the transition is not in the appropriate state, for example if Dispatch is invoked on a process that is in running state, no action should be taken (no state transition should occur).
Hint: Use the state of Zork example that we studied in class a point of departure for your implementation.
Implement a process ready and blocked queue as follows. Use STL queue of processes. The first process in the queue is in running state, the rest are in ready. Randomly (with probability of 33% for each case), the running process may either exit, be suspended, or be blocked
Report on the state of processes after each transition. See this file for an example output.
Demonstrate correct implementation of your ready queue and Prototype by admitting and scheduling 4 new processes.
Milestone: Implement Moving Square.