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

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 3PE
icon
Related questions
Question

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

 

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Developing computer interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,