Producer consumer problem

write a program in java is a simulation for the solution of producer consumer problem this
solution must use monitor to synchronize the two operation produce and consumer,
the produce operation appends two randomly integer
and the consume takes two integer and print the summations of these integers

note: create class that represent monitor and use synchronized method that appends and take two integers

conceptually a monitor maintains a set of permits each wait() with while statement blocks if necessary until a permits is available, and then take it. each notifyall() a permit potentially releasing all blocking
Asked Jan 05, 2013

TIP: If it's not your answer to this question, please click "Leave a Comment" button under the question to communicate with the question owner.