private double _yearlysalary;
public double YEARLYSALARY
public Employee(string Name, double YearlySalary)
YEARLYSALARY = YearlySalary;
public double CalculateSalary(string strType)
else if (strType == "quarter")
else if (strType == "year")
public string GetFirstThreeLetter()
return NAME.Substring(0,3);
public static void Main()
Employee Employee1 = new Employee("John",75000);
Console.WriteLine(Employee1.GetFirstThreeLetter());
Console.WriteLine(Employee1.CalculateSalary("month"));
Console.WriteLine(Employee1.CalculateSalary("quarter"));
Console.WriteLine(Employee1.CalculateSalary("year"));