Design a java program that implements a class named Task. This class should have three instance variables: taskName (a string), taskId (an integer), and taskWage (an integer). The class should have a constructor that initializes these variables. In the main class, create two worker threads, each with its own method to display the task details. The first method should display the task name, task ID, and task wage. The second method should display the same information, but with some additional information about the task. Both methods should accept an object of type Task as a parameter. The two worker threads should be paused for a specific amount of time (e.g. 1000ms) before they execute their methods. Additionally, use a relevant thread method to display the priority of each thread. Finally, check the status of each thread and display the name and status of each threa
Design a java program that implements a class named Task. This class should have
three instance variables: taskName (a string), taskId (an integer), and taskWage (an
integer). The class should have a constructor that initializes these variables.
In the main class, create two worker threads, each with its own method to display the
task details. The first method should display the task name, task ID, and task wage.
The second method should display the same information, but with some additional
information about the task. Both methods should accept an object of type Task as a
parameter.
The two worker threads should be paused for a specific amount of time (e.g. 1000ms)
before they execute their methods. Additionally, use a relevant thread method to
display the priority of each thread. Finally, check the status of each thread and display
the name and status of each threa
Step by step
Solved in 4 steps with 2 images