public abstract class Tax
public double Salary { get; set; }
public double CalculateTax(double salary)
public class EmployeeTax: Tax
public string Gender { get; set; }
public string Name { get; set; }
public string DateofBirth { get; set; }
public EmployeeTax(int id,string name)
public double CalculateTax(double salary,string gender, string dateofBirth)
static void Main(string[] args)
EmployeeTax employee = new EmployeeTax(1, "a");
employee.CalculateTax(12345);
employee.CalculateTax(12345, "Male", "234");