<?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 1 Solution and Discussion]]></title><description><![CDATA[<p dir="auto">Visual Programing (CS411)<br />
Assignment#01 (GRADED)<br />
Total marks = 20<br />
Deadline Date = 18-11-2019</p>
<p dir="auto">Please read all the instructions carefully before attempting the assignment.<br />
You are required to create a C# application Console using Visual Studio.<br />
Problem Statement:<br />
You will declare a new class name as “Student” then you will perform the Operator Overloading for following binary operators:</p>
<ul>
<li>operator<br />
*operator:<br />
For this you will take<br />
Second last digits and the last digit of your VU id as input.<br />
For example, if your VU id is bc12345678 you will take 7 and 8.<br />
You will write then following functions in class “student:<br />
For + operator overloading 1st function: concatenate last two digits<br />
Example: Your id is BC12345678<br />
1st function 7+8=78<br />
For * operator overloading 2nd function: take power of 2nd last digit the times last digit is<br />
Example: your ID is BC12345678<br />
2nd function 78=5,764,801<br />
Note: Program must show your own VUID usage.</li>
</ul>
<p dir="auto">Submission details<br />
Following Files Must be submitted in a single zip or rar file.<br />
•	.C# code file (file name should be your VUID)<br />
•	A .gif file which shows working 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 you will be awarded 0 Marks.</p>
]]></description><link>https://community.secnto.com//topic/626/cs411-assignment-1-solution-and-discussion</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 21:47:53 GMT</lastBuildDate><atom:link href="https://community.secnto.com//topic/626.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 19 Nov 2019 10:40:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CS411 Assignment 1 Solution and Discussion on Thu, 23 Jan 2020 17:09:20 GMT]]></title><description><![CDATA[<p dir="auto"><strong>100% Solved:</strong></p>
<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Student
    {
        public int x;
        public Student()
        {
        }
        public Student(int i)
        {
            x = i;
           // y = j;
        }
        /*  public void Showsum()

      private int sum1 = x + y;  
      {  
          Console.WriteLine(sum1);  
      }*/
        public static Student operator +(Student ss, Student ss2)
        {
            Student temp = new Student();
            temp.x = Int32.Parse(ss.x.ToString() + ss2.x.ToString());
            return temp;
            // return temp = tostring(d1) + tostring(d2);
        }
        public static Student operator * (Student ss, Student ss2)

        {
            double d= (double)ss.x;

            double dd = (double)ss2.x;


            Student temp = new Student();
            double result= Math.Pow(
                d
                ,dd);
            temp.x =(int) result;
            return temp;
            // return temp = tostring(d1) + tostring(d2);
        }

        class Program
        {
            static void Main(string[] args)
            {
                Student s1 = new Student(2);
                //S1.Showsum(); // displays 15  
                Student s2 = new Student(4);
                Student s3 = s1 + s2;
                Console.WriteLine(s3.x.ToString());
                Student s4 = s1 * s2;
                Console.WriteLine(s4.x.ToString());

                Console.Read();
                //S2.
            }
        }
    }
}
</code></pre>
<p dir="auto"><img src="https://i.imgur.com/yIfOM7y.gif" alt="assignment1gif.gif" class=" img-fluid img-markdown" /></p>
<p dir="auto"><a href="/assets/uploads/files/1579799356251-consoleapplication1.zip">ConsoleApplication1.zip</a></p>
]]></description><link>https://community.secnto.com//post/1734</link><guid isPermaLink="true">https://community.secnto.com//post/1734</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Thu, 23 Jan 2020 17:09:20 GMT</pubDate></item><item><title><![CDATA[Reply to CS411 Assignment 1 Solution and Discussion on Thu, 23 Jan 2020 17:07:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zaasmi" aria-label="Profile: zaasmi">@<bdi>zaasmi</bdi></a><br />
Solution file attached please check<br />
<a href="/assets/uploads/files/1574160570427-bc160400845.cs">bc12345678.cs</a></p>
<pre><code>    //&lt;&gt;
    //

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    namespace cs411
    {
    //my student id is bc150401804
    //last two digits of my student id are 0 and 4

    public class Student
    {

    public int Number { get; set; }
    public Student(int number)
    {
    Number = number;
    }

    public Student()
    {

    }

    public static string operator +(Student left, Student right)
    {
    string result = left.Number.ToString() + right.Number.ToString();
    return result;
    }

    public static long operator *(Student left, Student right)
    {

    int @base = left.Number;
    int power = right.Number;

    long result = 1;

    for (int i = 1; i &lt;= power; i++)
    {
    result*= @base;
    }


    return result;
    }


    }

    class Program
    {
    static void Main(string[] args)
    {

    var leftStudent = new Student(number:0); //first number of last two digits
    var rightStudent = new Student(number: 4); //second number of last two digits

    var firstResult = leftStudent + rightStudent;
    var secondResult = leftStudent * rightStudent;

    Console.WriteLine("1st operator + overloading result is = " + firstResult);
    Console.WriteLine("2nd operator * overloading result is = " + secondResult);

    Console.ReadKey();
    }
    }
    }

</code></pre>
]]></description><link>https://community.secnto.com//post/1733</link><guid isPermaLink="true">https://community.secnto.com//post/1733</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Thu, 23 Jan 2020 17:07:26 GMT</pubDate></item><item><title><![CDATA[Reply to CS411 Assignment 1 Solution and Discussion on Tue, 19 Nov 2019 10:46:40 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/1728">CS411 Assignment 1 Solution and Discussion</a>:</p>
<blockquote>
<p dir="auto">operator<br />
*operator:<br />
For this you will take<br />
Second last digits and the last digit of your VU id as input.<br />
For example, if your VU id is bc12345678 you will take 7 and 8.<br />
You will write then following functions in class “student:<br />
For + operator overloading 1st function: concatenate last two digits<br />
Example: Your id is BC12345678<br />
1st function 7+8=78<br />
For * operator overloading 2nd function: take power of 2nd last digit the times last digit is<br />
Example: your ID is BC12345678<br />
2nd function 78=5,764,801<br />
Note: Program must show your own VUID usage.</p>
</blockquote>
<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace cs411
{
class Program
{
static void Main(string[] args)
{
//for sum
Student std1 = new Student();
Student std2 = new Student();
Student std3 = new Student();

// for *
Student std4 = new Student();
Student std5 = new Student();
Student std6 = new Student();

std3 = std1 + std2;
std6 = std4 * std5;

//Printing Sum
Console.WriteLine("Overloading + Operator Result {0}", std3.concat);


//printing Power
Console.WriteLine("Overloading * Operator Result {0}", std6.raiseToPower);

Console.ReadKey();
}

}

class Student
{
public int secondLast = 7;
public int Last = 8;
public String concat = null;

public double raiseToPower = 0;


public Student() {

secondLast = 7;
Last = 8;
}

public static Student operator *(Student s1, Student s2)
{
Student s3 = new Student();
s3.raiseToPower = Math.Pow(s1.secondLast, s2.Last);
return s3;
}

public static Student operator +(Student s1, Student s2)
{
Student s3 = new Student();
s3.concat= s1.secondLast.ToString() +s2.Last.ToString();
return s3;
}


}
}

// just copy paste the code in your program. 
</code></pre>
]]></description><link>https://community.secnto.com//post/1732</link><guid isPermaLink="true">https://community.secnto.com//post/1732</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Tue, 19 Nov 2019 10:46:40 GMT</pubDate></item><item><title><![CDATA[Reply to CS411 Assignment 1 Solution and Discussion on Tue, 19 Nov 2019 10:45:57 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://youtu.be/aKwt1qaT0oo" target="_blank" rel="noopener noreferrer nofollow ugc">https://youtu.be/aKwt1qaT0oo</a></p>
]]></description><link>https://community.secnto.com//post/1731</link><guid isPermaLink="true">https://community.secnto.com//post/1731</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Tue, 19 Nov 2019 10:45:57 GMT</pubDate></item><item><title><![CDATA[Reply to CS411 Assignment 1 Solution and Discussion on Tue, 19 Nov 2019 10:43:32 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://www.youtube.com/watch?v=uAHJQUmrS6A" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.youtube.com/watch?v=uAHJQUmrS6A</a></p>
]]></description><link>https://community.secnto.com//post/1730</link><guid isPermaLink="true">https://community.secnto.com//post/1730</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Tue, 19 Nov 2019 10:43:32 GMT</pubDate></item><item><title><![CDATA[Reply to CS411 Assignment 1 Solution and Discussion on Tue, 19 Nov 2019 10:42:13 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/1728">CS411 Assignment 1 Solution and Discussion</a>:</p>
<blockquote>
<p dir="auto">You are required to create a C# application Console using Visual Studio.</p>
</blockquote>
<p dir="auto"><a href="https://youtu.be/W31AB3B_whw" target="_blank" rel="noopener noreferrer nofollow ugc">https://youtu.be/W31AB3B_whw</a></p>
]]></description><link>https://community.secnto.com//post/1729</link><guid isPermaLink="true">https://community.secnto.com//post/1729</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Tue, 19 Nov 2019 10:42:13 GMT</pubDate></item></channel></rss>