Use code below:
using System;
using System.Threading;
public class HW8_1 {
public static void Main() {
First first;
Last last;
HW.println(“——HW8-1—–“);
first = new First();
last = new Last();
HW.println(“Start”);
(new Thread(new ThreadStart(last.run))).Start();
(new Thread(new ThreadStart(first.run))).Start();
HW.println(“Finish”);
Console.ReadKey();
}
}
class First {
public void run(){
// CHANGE THIS OUTPUT TO YOUR NAME
HW.print(“F”);
HW.print(“I”);
HW.print(“R”);
HW.print(“S”);
HW.println(“T”);
}
}
class Last {
public void run(){
// CHANGE THIS OUTPUT TO YOUR NAME
HW.print(“L”);
HW.print(“A”);
HW.print(“S”);
HW.println(“T”);
}
}
class HW {
public static void print(string s) {
Console.Write(s); Console.Out.Flush();
Thread.Sleep(10);
}
public static void println(string s) {
Console.Write(s+”rn”); Console.Out.Flush();
Thread.Sleep(10);
}
}
• Program 1 – Start by using one thread to print your first and and a second thread to print your last name. • Program 2 – Modify Program 1 to use arrays of 15 threads for first and last name. Rerun until the output looks something similar to: First Finish LFLFLFLFLFLFLFLFLaiaiaiaiaiaiaiaiasrsrsrsrsrsrsrsrst + in + un Hints: First first[] = new First[15]; Start each thread individually. Show transcribed image text • Program 1 – Start by using one thread to print your first and and a second thread to print your last name. • Program 2 – Modify Program 1 to use arrays of 15 threads for first and last name. Rerun until the output looks something similar to: First Finish LFLFLFLFLFLFLFLFLaiaiaiaiaiaiaiaiasrsrsrsrsrsrsrsrst + in + un Hints: First first[] = new First[15]; Start each thread individually.
Expert Answer
Answer to Use code below: using System; using System.Threading; public class HW8_1 { public static void Main() { First first; Last…