Question: using java Write a JAVA program that creates Three Threads (Main thread in addition to two other threads: Threada and ThreadB) and produces the following

using java
Write a JAVA program that creates Three Threads (Main thread in addition to two other threads: Threada and ThreadB) and produces the following sample run Sample Run: (The underlined values are entered by the user) -------- ThreadA: Enter radius: 5.5 ThreadB: Enter Height : 4.5 ThreadA: the volume of the cylinder is : 427.6493 ThreadB: The volume is normal ThreadA: End 1. Threads Thread: a. Asks the user to enter radius b. Calculates and displays the volume of cylinder based on the following fomula: volume=1 x radius? x height c. Displays "End" 2. Threads Thread: a. Asks the user to enter Height b. Displays the status. The status is enormalif the volume is between 0 and 999. Otherwise, the status is NOT normal 3. Main thread: a. Creates the necessary semaphores b. Creates and starts the necessary threads Notes: 1. You should NOT use the join method. The threads will synchronize themselves using semaphores 2. It is your responsibility to know what are the shared variables and semaphores between the threads, and how to share them
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
