using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
public abstract class EMP
{
public abstract int SALARY
{
get;
}
public string Company
{
get
{
return "ICON Training";
}
}
}
public class SalesEmp : EMP
{
public override int SALARY
{
get
{
return 2000;
}
}
}
public class TechEmp : EMP
{
public override int SALARY
{
get
{
return 5000;
}
}
}
class Program
{
static void Main(string[] args)
{
SalesEmp se = new SalesEmp();
Console.WriteLine(se.SALARY);
TechEmp te = new TechEmp();
Console.WriteLine(te.SALARY);
}
}
}
No comments:
Post a Comment