public static void Main()
Console.WriteLine("Hello World");
Engineer en = new Engineer(){ MonthlySalary = 1500 };
Console.WriteLine("Engineer salary: $" + en.GetPaymentAmount());
public abstract class Employee
public double MonthlySalary { get; set; }
public double Commission { get; set; }
public double Bonus { get; set; }
public abstract int GetPaymentAmount();
public class Engineer:Employee
public override int GetPaymentAmount()
return (int) MonthlySalary;
public class Salesman:Employee
public override int GetPaymentAmount()
return (int) MonthlySalary + Commission;
public class Manager:Employee
public override int GetPaymentAmount()
return (int) MonthlySalary + Bonus;