Applied Materials interview question

Implement Queue class: constructor, enqueue and dequeue function. In addition, there are Semaphore class with constructor, up and down functions and Mutex class with lock and unlock functions.