Answered You can hire a professional tutor to get the answer.
I need this by tomorrow. I just cant get it to run 800. My code is below.
Can someone please help me with my code. please... I need this by tomorrow. I just cant get it to run 800. My code is below. If anything is missing, please leave a comment. I dont know how to add attachments to questions.
------------------------------------------
There is a timing issue with the sample which would be a major problem if it actually was a production program for a bank. I want the program so that you get 800 as the final value every time it is run.
For this I want you to use one of the Java constructs like synchronize, countdownlatch or semaphore. C# has similar constructs. I do not want you changing the accountbalance from being a static nor do I want you to remove the initialize to 0 in the threads. If you are going to synchronize you want to synchronize as small a section as possible. It does little good to synchronize a large part of a threaded program... because it might as well not be threaded. Finally, I want you to replace the sleep in the main with some other mechanism to force the main to wait until all child threads are finished.
Run the program 3 times and make sure you show the final output in the documentation.
1) Attach your code as well as a document. The document should include snapshots (enough to demonstrate it ran) of the running code. Include a lessons learned.
//**********************************************************************