30 lines
838 B
C#
30 lines
838 B
C#
using System;
|
|
|
|
class Administrator : Person, IEmployee
|
|
{
|
|
public string Laboratory { get; }
|
|
public string Department => Laboratory;
|
|
public string Position => "Администратор";
|
|
public int Experience { get; }
|
|
public decimal BaseRate { get; }
|
|
|
|
public Administrator(string lastName, DateTime birthDate, string laboratory, int experience, decimal baseRate)
|
|
: base(lastName, birthDate)
|
|
{
|
|
Laboratory = laboratory;
|
|
Experience = experience;
|
|
BaseRate = baseRate;
|
|
}
|
|
|
|
public override void Show()
|
|
{
|
|
Console.WriteLine("Администратор: {0}, лаб.: {1}, стаж: {2} лет, возраст: {3}", LastName, Laboratory, Experience, Age());
|
|
}
|
|
|
|
public decimal GetMonthlyPay()
|
|
{
|
|
return BaseRate * (1 + 0.05m * Experience);
|
|
}
|
|
}
|
|
|