public string Name { set; get; }
public string Title { set; get; }
public int Age { set; get; }
public Employee(string n, string t, int a)
public string ShowDetail()
strReturn = Title + ": " + Name;
public class Staff : Employee
public double DailyWage { get; set; }
public Staff(string n, string t, int a, double w)
public double CalculateTotalWage(int nDays, bool bExtraBonus)
if (Age > 60) val += 1000;
public static void Main()
Staff s = new Staff("John", "Specialist", 28, 120);
Console.WriteLine(s.Name);
Console.WriteLine(s.Title);
Console.WriteLine(s.CalculateTotalWage(250, true));