完了

THREADS AND THREAD SYNCHRONIZATION

Create a Java application or applet that uses threads to simulate a race. Here are the rules of the race. Each person in the race is given a 5 Gallon bucket that they must fill with water. Each person then must run 10 yards to a tap of water, fill their hands with water and return to the bucket and empty this water into the bucket. Unfortunately the movement from the tap to the bucket can cause water to spill out of the person’s hand, so this can take some time. There is one other problem as well. There are three people involved in the race but there is only one tap of water. So if a person arrives to fill their hands and the tap is taken they must wait for the tap to become available before they can fill their hands with water. Each thread will extend either a Jpanel (recommended) or JComponent object and have a paint method that will paint itself appropriately(paint a rectangle and fill it in to represent how much water is in the bucket). Each thread will have a method that puts itself to sleep for a randomly generated amount of time (this is travel time). Once the thread wakes up, you will attempt to fill your hands with water (if the tap is available). Once your threads hands are full you will use a random number generator to determine how much water has spilled out of your hands during travel time and adjust the amount of water in your hands. You will then empty this water into your bucket and continue doing this until the bucket is full. The winner is of course the first person to fill the bucket with water

## Deliverables

1) Complete 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) Complete ownership and distribution copyrights to all work purchased.

## Platform

Windows 2000 Professional, jdk 1.3.1

## Deadline information

Must be completed by 12\13\2002

スキル: エンジニアリング, Java, MySQL, PHP, ソフトウェアアーキテクチャ, ソフトウェアテスト

さらに表示: thread up, one source water, how to run a java applet, threads, thread, the tap, java thread, hand paint, travel java code, windows tap, create full program java, create java object, java program synchronization, windows form code generator, random code generator, program paint program java, paint java program, water movement java applet, paint program java, windows form generator

採用者について:
( 2件のレビュー ) Canada

プロジェクトID: #2890572

アワード:

avichapman

See private message.

$34 USD 14日以内
(28レビュー)
4.5

3人のフリーランサーが、このジョブに平均$34で入札しています

decomp

See private message.

$34 USD 14日以内
(95件のレビュー)
6.3
yutingkuo

See private message.

$34 USD 14日以内
(0件のレビュー)
0.0