100% Solved:
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. } } } }assignment1gif.gif