Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

could you please help out, my submission is in a few hours. Thank you This project is based on a YouTube tutorial on multithreading in

could you please help out, my submission is in a few hours. Thank you This project is based on a YouTube tutorial on multithreading in Java. The tutorial can be accessed here. You can complete the project only after watching the tutorial. Only the first 32 to 33 minutes of the video are relevant to this project. (a) In the first part of the project you will write code for tasks Task1, Task2 and Task3 without threads. The code for the tasks will be executed sequentially without any parallel execution. You will modify the code discussed in the tutorial as follows: Task 1 will now print character '\( a \)' one hundred times, Task2 will print character '\( b \)' one hundred times and Task3 will print integers from 1 to 100. Print/save the source code at this stage and the output of the program execution for submission. (b) In this part you will create a thread and run the Task 1 in this thread. Task 2 and Task3 code will remain unchanged. Now Task1 can execute in parallel with Tasks 2 and 3. Print/save the source code at this stage and the output of the program execution for submission. (c) In this part you will create a separate thread for each of the three tasks: Task1, Task2 and Task3. Including the main thread of the main method the program will now have four threads altogether. These threads can run in parallel. Print/save the source code at this stage and the output of the program execution for submission. (d) In this part you will change the default priority of the threads as follows: Task3 should run with the highest priority and Task1 should run with least priority. Task2's priority should remain unchanged. Print/save the source code at this stage and the output of the program execution for submission. (e) In this part you will use the thread join method to always ensure that tasks are completed in the order Task1, Task2 and Task3. Print/save the source code at this stage and the output of the program execution for submission. i need you to solve each step by explain and with a screenshot

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions