theme changed
This commit is contained in:
29
labs/lab9/LearningCenter/Administrator.cs
Normal file
29
labs/lab9/LearningCenter/Administrator.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user