Find Jobs
Hire Freelancers

Simple Java Program

$10-30 USD

Terminado
Publicado hace más de 9 años

$10-30 USD

Pagado a la entrega
Multithreading Producer Consumer Assignment Consider the producer/consumer problem using Message objects using a BlockingQueue. Create a class called Message which contains a String attribute to hold a message. Create a Runnable class called Producer that will create 100 messages (use a for loop). Have the Producer use the [login to view URL]() method to vary the time to produce a Message (hint: use the index of the for loop to determine milliseconds to sleep each time through the loop: first time through the loop sleep 0 milliseconds, second time sleep 1 milliseconds, etc.). The Producer will place the messages in a BlockingQueue for the consumer to pick them up. Have the producer send a message containing the String "Exit" to signal that it is done producing. Use appropriate output display announcing the production of each message. Create a Runnable class called Consumer to consume the messages from the producer. Have it get each message from the BlockingQueue The consumer will know when it is done by checking to see if the message content is "Exit". Have the Consumer use the [login to view URL]() method to delay consuming of each message by 10 milliseconds. Use appropriate output display announcing the consuming of each message. Create a test program to test your Producer and Consumer classes. The test program will create a BlockingQueue of size 10 for the producer and consumer to use (BlockingQueue is in the [login to view URL] package). Create and run a producer and consumer thread. What are the results? Increase the consumer sleep time to 100 miliseconds and rerun the test program. What difference did that make? Note: Answer questions by putting the results in a file called Results.txt. Place the [login to view URL] file in the main project folder.
ID del proyecto: 6444211

Información sobre el proyecto

3 propuestas
Proyecto remoto
Activo hace 10 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
Hi, I would like to do this project please. Let me know if you are interested so I can start. Thanks.
$30 USD en 1 día
4,9 (1267 comentarios)
7,8
7,8
3 freelancers están ofertando un promedio de $55 USD por este trabajo
Avatar del usuario
I am a professional java developer and i can help building this Multithreading class for you. Is this needed asap? I am online right now. Thanks in advance.
$111 USD en 0 día
5,0 (7 comentarios)
3,9
3,9
Avatar del usuario
Sir, i can work with java android PHP MYSQL HTML5 wordpress jquery bootstrap. I can do your work and can communicate with ease. So if you give me an opportunity to work with you i will be thankful to you.
$24 USD en 1 día
4,7 (4 comentarios)
2,3
2,3

Sobre este cliente

Bandera de UNITED STATES
atlanta, United States
5,0
32
Forma de pago verificada
Miembro desde mar 30, 2014

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.