namespace Employees; /// /// Represents an employee who works at an office /// /// public class OfficeEmployee : Employee { /// /// Creates a new employee who works at an office /// /// Name of the employee /// Gender of the employee /// Department of the employee /// Monthly salary of the employee; cannot be negative public OfficeEmployee(string name, Gender gender, string department, decimal monthlySalary) : base(name, gender, department) { Salary = Math.Max(0M, monthlySalary); } public override decimal Salary { get; } public override string ToString() => $"{base.ToString()} as an employee"; }