Create producer-and-consumer problem

this is graphical implementation of producer and consumer problem,using c++,this code is not solution for all condition,i am requesting to my group member please help me................