QUESTION 3
(30 MARKS)
C# supports parallel execution of code through multithreading: A thread is an independent execution path, able to run simultaneously with other threads. Shown by the diagram below:
Main Thread
thread ends
new Thread
application ends
time
Start (0) YyyyyyyyyyyYYYYYY Worker Thread
thread ends Yyyyyyyyyyyyy
You have been tasked to create a new thread that will print the multiplication table of 10, and the Main Thread will print the table of 15. There should be communication between these two threads in such a way that the table of 10 is printed before the multiplication table of 15 to maintain an ascending order.