inh-01-employees/Employees/Employee.cs
github-classroom[bot] b9c04768e7
Initial commit
2025-02-25 16:55:29 +00:00

70 lines
1.6 KiB
C#

namespace Employees;
/// <summary>
/// Represents an employee of a company
/// </summary>
public abstract class Employee
{
private readonly string _name = null!;
/// <summary>
/// Creates a new employee
/// </summary>
/// <param name="name">Name of the employee</param>
/// <param name="gender">Gender of the employee</param>
/// <param name="department">Department the employee works at</param>
protected Employee(string name, Gender gender, string department)
{
Name = string.Empty;
Gender = Gender.Divers;
Department = string.Empty;
// TODO
}
/// <summary>
/// Gets the name of the employee
/// </summary>
public string Name
{
get => _name;
private init
{
// TODO
}
}
/// <summary>
/// Gets the department of the employee
/// </summary>
public string Department { get; }
/// <summary>
/// Gets the gender of the employee
/// </summary>
public Gender Gender { get; }
/// <summary>
/// Gets the salary of the employee
/// </summary>
public abstract decimal Salary { get; }
/// <summary>
/// Creates a string representation of the employee with some basic information
/// </summary>
/// <returns>String representation of the employee</returns>
public override string ToString()
{
// TODO
return string.Empty;
}
}
/// <summary>
/// Represents the possible genders for an employee
/// </summary>
public enum Gender
{
Male,
Female,
Divers
}