Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}
6 changes: 6 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
Binary file not shown.
Empty file.
Binary file added .vs/coding-evaluation/v17/.wsuo
Binary file not shown.
Binary file added .vs/slnx.sqlite
Binary file not shown.
22 changes: 20 additions & 2 deletions dotnet/MyOrganization/Organization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public Organization()

protected abstract Position CreateOrganization();

// This is to generate identifier for the Employees
int identifier = 1;

/**
* hire the given person as an employee in the position that has that title
*
Expand All @@ -26,7 +29,22 @@ public Organization()
*/
public Position? Hire(Name person, string title)
{
//your code here
Employee employee = new Employee(identifier++, person);
return CheckDirectReportPositions(root, employee, title);
}

private Position? CheckDirectReportPositions(Position pos, Employee employee, string title)
{
if (pos.GetTitle() == title)
{
pos.SetEmployee(employee);
return pos;
}

foreach (Position p in pos.GetDirectReports())
{
CheckDirectReportPositions(p, employee, title);
}
return null;
}

Expand All @@ -45,4 +63,4 @@ private string PrintOrganization(Position pos, string prefix)
return sb.ToString();
}
}
}
}
1 change: 0 additions & 1 deletion java/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions java/README.md

This file was deleted.

27 changes: 0 additions & 27 deletions java/com/aa/act/interview/org/Employee.java

This file was deleted.

49 changes: 0 additions & 49 deletions java/com/aa/act/interview/org/MyOrganization.java

This file was deleted.

29 changes: 0 additions & 29 deletions java/com/aa/act/interview/org/Name.java

This file was deleted.

39 changes: 0 additions & 39 deletions java/com/aa/act/interview/org/Organization.java

This file was deleted.

61 changes: 0 additions & 61 deletions java/com/aa/act/interview/org/Position.java

This file was deleted.

12 changes: 0 additions & 12 deletions javascript-es5/Employee.js

This file was deleted.

43 changes: 0 additions & 43 deletions javascript-es5/MyOrganization.js

This file was deleted.

13 changes: 0 additions & 13 deletions javascript-es5/Name.js

This file was deleted.

22 changes: 0 additions & 22 deletions javascript-es5/Organization.js

This file was deleted.

Loading