Develop a multithreaded producer and consumer application. The producer will add 15 strings of various length to the buffer. You can hardcode 15 strings of arbitrary length  in the producer class. You need to create one producer thread.

Java
INSY 4306
HOMEWORK 3
You will develop a multithreaded producer and consumer application. The producer will add 15
strings of various length to the buffer. You can hardcode 15 strings of
arbitrary length  in the producer class. You need to create one producer
thread.
Consumer is going to read each string from the buffer and calculate the length of the string and
reverse the string after reading. Consumer will display the length of each string and each of the
reversed string as well. You need to create three consumer threads.
Note: You should use 4 separate color for each thread. You should use ReentrantLock for
synchronization among producer thread and 3 consumer threads.
You should name your project HW3. Make sure to include relevant project files and place all the
files in a folder named “Your Last Name_Your UTAID” and upload the zipped folder to Canvas

Latest News

Discover your perfect program in our courses.