Using Java:
Create a deque class based on the discussion of deques (double-ended queues). It should include insertLeft(), insertRight(), removeLeft(), removeRight(), isEmpty(), and isFull() methods. You can add additional helper methods if you like. Also, create a main class to test out your Deque. Create an Exception Handling class called DequeException that throws exceptions when the Deque is empty or full.