using System;

class Teacher : Person, IEmployee
{
    public string Faculty { get; }
    public string Rank { get; }
    public int Experience { get; }
    public decimal BaseRate { get; }
    public string Department => Faculty;
    public string Position => Rank;

    public Teacher(string lastName, DateTime birthDate, string faculty, string rank, int experience, decimal baseRate)
        : base(lastName, birthDate)
    {
        Faculty = faculty;
        Rank = rank;
        Experience = experience;
        BaseRate = baseRate;
    }

    public override void Show()
    {
        Console.WriteLine("Преподаватель: {0}, факультет: {1}, должность: {2}, стаж: {3} лет, возраст: {4}", LastName, Faculty, Rank, Experience, Age());
    }

    public decimal GetMonthlyPay()
    {
        decimal mult = Rank.ToLower().Contains("проф") ? 1.4m : Rank.ToLower().Contains("доцент") ? 1.2m : 1.0m;
        return BaseRate * mult * (1 + 0.04m * Experience);
    }
}

