Using a hash map and vectors, create a text interface to allow a user to add employee names to a department in the company. For example, "Add Sally to Engineering" or "Add Amir to Sales". Then let the user retrieve a list of all people in a department or all people in the company by department, sorted alphabetically.
Using a hash map and vectors, create a text interface to allow a user to add employee names to a department in the company. For example, "Add Sally to Engineering" or "Add Amir to Sales". Then let the user retrieve a list of all people in a department or all people in the company by department, sorted alphabetically.
Using a hash map and vectors, create a text interface to allow a user to add employee names to a department in the company. For example, "Add Sally to Engineering" or "Add Amir to Sales". Then let the user retrieve a list of all people in a department or all people in the company by department, sorted alphabetically.
- I am suspicious that match statements inside match statements is not good practice.
- The
Command::Add
branch inprocess_command
feels a little hacky with the()
return. Edit: After thinking more about this problem, I think if I wrapped the branch responses inOk()
then I could return aResult
from that function.
- I am suspicious that match statements inside match statements is not good practice.
- The
Command::Add
branch inprocess_command
feels a little hacky with the()
return.
- I am suspicious that match statements inside match statements is not good practice.
- The
Command::Add
branch inprocess_command
feels a little hacky with the()
return. Edit: After thinking more about this problem, I think if I wrapped the branch responses inOk()
then I could return aResult
from that function.