-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Rusty Employee Manager | ||
|
||
A command-line interface for managing employee assignments within a company, implemented in Rust. This tool allows users to add employees to departments and retrieve sorted lists of employees. | ||
|
||
## Features | ||
|
||
- **Add Employee**: Add employees to departments with commands like `Add [Employee name] to [department name]`. | ||
- **Show Employees**: Retrieve a comma-separated list of employees in a specified department with commands like `Show [department name]`. | ||
- **Interactive CLI**: User-friendly text interface for managing and displaying employee data. | ||
|
||
## Example output | ||
|
||
```txt | ||
Welcome to an employee manager! | ||
Use two types of commands: | ||
"Add [Employee name] to [department name]" ===> Example: "Add Amir to Sales" | ||
OR | ||
"Show [department name]" ===> Example: "Show [department name]" | ||
OR | ||
"Exit" | ||
Please enter a command: | ||
Add Sasha to QA | ||
Employee "Sasha" is added to "QA" | ||
Please enter a command: | ||
Add Alex to QA | ||
Employee "Alex" is added to "QA" | ||
Please enter a command: | ||
Show QA | ||
Sasha, Alex | ||
Please enter a command: | ||
exit | ||
Goodbye! | ||
``` | ||
|
||
|
||
## Installation | ||
|
||
To build and run this project, ensure you have Rust installed. You can then use Cargo to manage and run the project: | ||
|
||
```sh | ||
cargo build | ||
cargo run | ||
``` | ||
|
||
## Usage | ||
|
||
Run the application and follow the on-screen instructions. Here are some example commands you can use: | ||
|
||
* Add an employee: `Add [Employee name] to [department name]` | ||
* Example: `Add Amir to Sales` | ||
* Show employees: `Show [department name]` | ||
* Example: `Show Sales` | ||
* Exit: Type `Exit` to close the application. | ||
|
||
## Testing | ||
|
||
```sh | ||
cargo test | ||
``` | ||
|
||
The tests cover various aspects of the functionality, including command parsing and employee management. | ||
|
||
## License | ||
This project is licensed under the MIT License. See the LICENSE file for details. | ||
|
||
|
||
|