theme changed

This commit is contained in:
nik
2025-09-30 08:21:09 +03:00
parent 4c261f7def
commit 8bd93df2ae
917 changed files with 15023 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
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);
}
}