Implemented AskForRoom() and NoOfEmployees in Company.cs
This commit is contained in:
parent
cb34bde971
commit
d2c41943f6
1 changed files with 4 additions and 5 deletions
|
|
@ -24,12 +24,11 @@ public sealed class Company
|
|||
/// Gets the name of the company
|
||||
/// </summary>
|
||||
public string Name { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of employees working for the company
|
||||
/// </summary>
|
||||
// TODO
|
||||
public int NoOfEmployees => -1;
|
||||
public int NoOfEmployees => _employeeRooms.Count;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the room number the clerk identified by the provided
|
||||
|
|
@ -39,8 +38,8 @@ public sealed class Company
|
|||
/// <returns>Room number if found; null otherwise</returns>
|
||||
public int? AskForRoom(BusinessCard businessCard)
|
||||
{
|
||||
// TODO
|
||||
return -1;
|
||||
bool found = _employeeRooms.TryGetValue(businessCard, out int room);
|
||||
return found ? room : null;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue