Find Jobs
Hire Freelancers

Java Threads Problem

$15-20 USD

Cerrado
Publicado hace más de 21 años

$15-20 USD

Pagado a la entrega
Use Java monitors to implement the following problem: Two teams, each consisting of 3 players, face each other across a loaded table. Each team is heavily armed with ping pong balls and strives to lob said balls into the cups of the opposing team as quickly as possible. There are 17 cups on each side, which somehow remain standing throughout the game. When a ping pong ball lands in a cup, the cup is instantaneously drained of fluid by forces unseen. The first team to cause all cups of the opposing team to be drained is the winner. The 3 players on each team are so well lubricated that they are like greased lightning in terms of speed, and can perform the entire sequence of grasping and tossing a ping pong ball to its destination in an amount of time uniformly distributed between 0.5 and 1.5 seconds, but in terms of accuracy have an equal chance of hitting or missing a cup on any given throw, and are unable to distinguish drained cups from those which still bear fluid, due to transient difficulties with blurred vision and unsteady hand resulting from prior ‘lubrication’ (so all 17 cups have an equal probability of being hit, and therefore drained, on any toss that makes it into a cup). Thus not every throw that hits a cup actually changes the score since only the number of drained cups matters. All 6 players operate concurrently. The player that hits a filled cup has to stop and drink the liquid in that cup (which takes 2 seconds), after which the accuracy of hitting a cup is reduced by 5% (meaning each time a player drains a cup, their accuracy is reduced by 5%). Besides a thread for each player, your program should have a thread to monitor and display the progress of the game every 6 seconds until one team wins (which should be reported as soon as it happens, along with the total elapsed time). Just to keep the simulation moving along at a good clip, the game in the mind of the computer should be played at 60 times the speed at which our worthy professional human players do it. Among other things, this means that the reports from the monitor should actually be displayed 10 times per second. The reports themselves should merely consist of lines that each show 3 numbers: the elapsed time and the number of drained cups for each team. Submit your programming and test runs. ## Deliverables 1) Complete, well documented and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Your work must match the specifications EXACTLY. Do not add any extra "features". 4) Complete ownership and distribution copyrights to all work purchased. ## Platform Java ## Deadline information This deadline cannot be extended. It is before the Thanksgiving holiday. If you can't meet the deadline, don't bid! Any coder who wins the bid but doesn't meet the deadline will receive a negative rating.
ID del proyecto: 2885922

Información sobre el proyecto

2 propuestas
Proyecto remoto
Activo hace 21 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
2 freelancers están ofertando un promedio de $16 USD por este trabajo
Avatar del usuario
See private message.
$16,15 USD en 14 días
4,9 (11 comentarios)
2,6
2,6
Avatar del usuario
See private message.
$15,30 USD en 14 días
4,8 (6 comentarios)
2,3
2,3

Sobre este cliente

Bandera de UNITED STATES
United States
4,9
8
Miembro desde sept 1, 2002

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.