(a) Write a monitor to implement a bounded stack, b_stack, which may contain at most max elements. The push and pop operations behave as follows: stack.push(x): If the stack is not completely full, the operation pushes the new element x on top of the stack. Otherwise, the operation has no effect and the value of x is discarded. stack.pop(x): If the stack is not completely empty, the operation removes the value currently on top of the stack and returns the value in the variable x. If the stack is empty, the operation waits until a value has been pushed on the stack and then completes the pop.