Files
oop/labs/lab9/LearningCenter/Administrator.cs
2025-09-30 08:21:09 +03:00

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);
}
}