• 18
  • Locked
Implement the Runnable interface in the Pharmacy and Person classes. All threads should run until isStopped is true. Here's the logic for the Pharmacy class: drugController should make a random drug purchase (getRandomDrug) in a random amount (getRandomCount) and wait 300 ms. Here's the logic for th
You can't complete this task, because you're not signed in.
Comments (5)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Level 32 , Kraków, Poland
18 January, 10:36
Chillout task. It calm code whose give you pleasure when you read it (contradiction to code in task Restaurant)
Justin Smith
Level 38 , Greenfield, USA, United States
25 September 2021, 01:14
One of the most fun tasks so far. You can begin to see how games have things going on in the background without player interactivity, including random content.
Ivaylo Trifonov
Level 22 , Madrid, Spain
9 August 2019, 15:31
First, it says: "All threads should run until isStopped is true." And then in the conditions: "The Pharmacy thread should run as long as isStopped is false." and "The Person thread should run as long as isStopped is false.".
Level 23 , Luxembourg, Luxembourg
18 April 2020, 16:05
They are not contradicting statements so i am not sure what your issue is ?
Roman Grygorczuk
Level 19 , Cracow, Poland
1 March 2021, 20:16
I recommend to recall this lesson "Stopping threads: the official version"