A process is an instance of a computer program that is being executed. It contains the
program code and its current activity. As a process executes, it changes state. A process
has five states: NEW, READY, RUNNING, WAITING, and TERMINATED. The state
transition can be described as the following figure.
//input/output
define an enum class to represent the states of a process and design a class
named Process to implement the state transition of process. All transitions are the public
member functions of Process. Process also has a public member function,
displayState(), to display the current state.
Input / Output
Your program should be able to continuously read a character from cin until EOF is
detected or the state of Process is TERMINATED. There are ten characters to represent
five transitions as follows:
'A' or 'a': admit
'D' or 'd': dispatch
'I" or 'i': interrupt
'W' or 'w': wait
'E' or 'e': exit
After a character input, show the current state of Process.
how write this problem