I have a producer and consumer program implemented in Java. I would like to know how I can make the user type in "start" to start a new set of producer and consumer threads and type in "stop" to stop all the threads.
public static void main(String[] args) {
BoundedBuffer bb = new BoundedBuffer(buffer size: 5, producers: 10, consumers: 1);
bb.start();