32 lines
882 B
C#
32 lines
882 B
C#
using System;
|
|
|
|
class Manager : Person, IEmployee
|
|
{
|
|
public string Faculty { get; }
|
|
public string Role { get; }
|
|
public int Experience { get; }
|
|
public decimal BaseRate { get; }
|
|
public string Department => Faculty;
|
|
public string Position => Role;
|
|
|
|
public Manager(string lastName, DateTime birthDate, string faculty, string role, int experience, decimal baseRate)
|
|
: base(lastName, birthDate)
|
|
{
|
|
Faculty = faculty;
|
|
Role = role;
|
|
Experience = experience;
|
|
BaseRate = baseRate;
|
|
}
|
|
|
|
public override void Show()
|
|
{
|
|
Console.WriteLine("Менеджер: {0}, факультет: {1}, должность: {2}, стаж: {3} лет, возраст: {4}", LastName, Faculty, Role, Experience, Age());
|
|
}
|
|
|
|
public decimal GetMonthlyPay()
|
|
{
|
|
return BaseRate * (1 + 0.06m * Experience);
|
|
}
|
|
}
|
|
|