Program for Operator Overloading using C Sharp

using System; class TSS {     int fees;     public TSS()     {         fees=0;     }     public TSS(int f)     {         this.fees=f;     }     public static TSS operator+(TSS obj1, TSS obj2)     {         TSS obj = new TSS();         obj.fees=obj1.fees + obj2.fees;         return obj;     }     public void TotalFeeCollection()     {         Console.WriteLine(“Total Fee Collected ” +fees);     }    public static void…

View More Program for Operator Overloading using C Sharp

Program for Run Time Polymorphism using C Sharp

using System; class Manager {      public virtual void Work()      {          Console.WriteLine(“Manager”);      } } class Employee : Manager {      public override void Work()      {          Console.WriteLine(“Employee”);      } } class Trainee : Employee {      public override void Work()      {          Console.WriteLine(“Trainee”);      }      public void Chess()      {          Console.WriteLine(“Playing chess”);      } } class Program {     public static void Main()…

View More Program for Run Time Polymorphism using C Sharp

Inheritance in OOP | Basic Concepts

Inheritance is one of the most important concept of Object-Oriented Programming. It is one of the building block for programming concepts. What is Inheritance? There are 5 points which will define the concept of Inheritanc.e in a simpler way: It is based on Generalization Principle. It explains about the logical association of Parent class with child class or Base class with Derived class. Child class inherits all the properties of…

View More Inheritance in OOP | Basic Concepts