<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CS411 Assignment 3 Solution and Discussion]]></title><description><![CDATA[<p dir="auto">Visual Programing (CS411)<br />
Assignment#03 (GRADED)<br />
Total marks = 20<br />
Deadline Date = 23-01-2020<br />
Please carefully read all the instructions carefully before attempting the assignment.<br />
Problem Statement:<br />
Develop a WPF application in C# with the following functionality:<br />
•	Create a Thread using threadpool.<br />
•	It will also utilize the stopwatch for thread time execution calculation.<br />
•	When the application starts the following window appears:<br />
<img src="https://i.imgur.com/vZSHR3a.png" alt="d4e52c4f-285b-4b15-b925-e39d8d40eb6b-image.png" class=" img-fluid img-markdown" /><br />
One Text Box:<br />
Your application will have textbox for input field along with label:<br />
Student ID(Last 4 digit)<br />
This will input Last Four digit of your VUID i.e. VUID:123456789<br />
It will take6789 as input<br />
One Button:<br />
Start writing to file (This button will write data to text file named: output.txt)<br />
One Label:<br />
A final label for showing the time consumed by threadpool to write in text file<br />
Working Procedure:<br />
•	Clicking the button “Start writing to file “will create the thread using threadpool and start the timer (Stopwatch).<br />
•	This thread will execute a process having a for loop<br />
•	For loop will execute number of times enterd in textbox (VUID last 4 digit value)<br />
•	Then Label will show time consumed while writing into text file.</p>
<p dir="auto">Write your own VU id in the application name and id fields while creating .gif file, otherwise your assignment will not be accepted.<br />
Output.gif has been attached with this Assignment file please observe this file carefully your program’s output must be like this output file.<br />
Submission details<br />
Following Files Must be submitted in a single zip or rar file.<br />
•	.C# code file<br />
•	.XAML File (Front End file)<br />
•	Text file (named as your (output.txt)<br />
•	A .gif file which shows Run phase of your Application (For Recording .gif a software named Screentogif is uploaded on LMS, or you can use any other gif recording tool as well)<br />
You are not required to submit the complete project, only copy these three files from project folder. Please note if you submit doc file you will be awarded 0 marks.<br />
If you do not submit any of the above mentioned file 25% marks per file will be deducted.<br />
<img src="https://i.imgur.com/HjlVhuQ.gif" alt="assignment3giffinal.gif" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.secnto.com//topic/1175/cs411-assignment-3-solution-and-discussion</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 21:47:33 GMT</lastBuildDate><atom:link href="https://community.secnto.com//topic/1175.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 23 Jan 2020 16:54:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CS411 Assignment 3 Solution and Discussion on Thu, 23 Jan 2020 17:03:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zareen" aria-label="Profile: zareen">@<bdi>zareen</bdi></a> said in <a href="/post/3113">CS411 Assignment 3 Solution and Discussion</a>:</p>
<blockquote>
<p dir="auto">threadpool</p>
</blockquote>
<pre><code>public static class ThreadPool
</code></pre>
<p dir="auto">Examples</p>
<pre><code>using System;
using System.Threading;

public class Example 
{
    public static void Main() 
    {
        // Queue the task.
        ThreadPool.QueueUserWorkItem(ThreadProc);
        Console.WriteLine("Main thread does some work, then sleeps.");
        Thread.Sleep(1000);

        Console.WriteLine("Main thread exits.");
    }

    // This thread procedure performs the task.
    static void ThreadProc(Object stateInfo) 
    {
        // No state object was passed to QueueUserWorkItem, so stateInfo is null.
        Console.WriteLine("Hello from the thread pool.");
    }
}
// The example displays output like the following:
//       Main thread does some work, then sleeps.
//       Hello from the thread pool.
//       Main thread exits.
</code></pre>
<pre><code>void WaitCallback(Object state)
</code></pre>
<p dir="auto"><a href="https://docs.microsoft.com/en-us/dotnet/api/system.threading.threadpool?view=netframework-4.8" target="_blank" rel="noopener noreferrer nofollow ugc">Source</a></p>
]]></description><link>https://community.secnto.com//post/3117</link><guid isPermaLink="true">https://community.secnto.com//post/3117</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Thu, 23 Jan 2020 17:03:36 GMT</pubDate></item><item><title><![CDATA[Reply to CS411 Assignment 3 Solution and Discussion on Thu, 23 Jan 2020 16:56:32 GMT]]></title><description><![CDATA[<pre><code>var watch = System.Diagnostics.Stopwatch.StartNew();              
for (int i = 0; i &lt; 1000; i++) {     
Console.Write(i); 
}  watch.Stop();  

Console.WriteLine($"Execution Time: {watch.ElapsedMilliseconds} ms");
</code></pre>
]]></description><link>https://community.secnto.com//post/3116</link><guid isPermaLink="true">https://community.secnto.com//post/3116</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Thu, 23 Jan 2020 16:56:32 GMT</pubDate></item><item><title><![CDATA[Reply to CS411 Assignment 3 Solution and Discussion on Thu, 23 Jan 2020 16:56:16 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://youtu.be/VSHrNQftyHQ" target="_blank" rel="noopener noreferrer nofollow ugc">https://youtu.be/VSHrNQftyHQ</a></p>
]]></description><link>https://community.secnto.com//post/3115</link><guid isPermaLink="true">https://community.secnto.com//post/3115</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Thu, 23 Jan 2020 16:56:16 GMT</pubDate></item></channel></rss>