Skip to content

Commit

Permalink
IO Redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffinsonDarmawan committed Apr 14, 2024
1 parent 208a704 commit c663e8c
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 26 deletions.
51 changes: 38 additions & 13 deletions text-ui-test/EXPECTED-UNIX.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,44 @@ Hello from

Type `help`, to view a list of valid commands!
What can I do for you?
Here are the list of commands you can use:
1. new <bouquetName> - Add a bouquet
2. delete <bouquetName> - Delete a bouquets
3. mybouquets - List current saved bouquets
4. info <flowerName> - Provide information on chosen flower
5. add <flowerName> /c <colour> (optional) /q <quantity> /to <bouquetName> - add flower to a bouquet
6. remove <flowerName> /c <colour> (optional) /q <quantity> /from <bouquetName> - remove flower from a bouquet
7. flowers - Shows a list of flowers that can be added into mybouquets
8. flowers <occasion> - Shows a list of flowers associated with said occasion
9. occasion - Shows a list of occasions associated with available flowers
10. save <bouquetName> - Saves a bouquet to an external <bouquetName>.txt file
11. recommend - Recommends a bouquet based on the chosen occasion and colour
12. bye - Exits the programme
Here is the table showing a list of commands you can use:
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| No. | Command | Explanation | Example |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 1 | new <bouquetName> | Add a bouquet | new Birthday Bouquet |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 2 | delete <bouquetName> | Delete a bouquets | delete Birthday Bouquet |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 3 | mybouquets | List current saved bouquets | mybouquets |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 4 | info <flowerName> | Provide information on chosen flower | info Rose |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 5 | add <flowerName> /c <colour> (optional) /q <quantity> | Add flower to a bouquet | add Rose /c Red /q 5 /to Birthday Bouquet |
| | /to <bouquetName> | | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 6 | remove <flowerName> /c <colour> (optional) /q <quantity> | Remove flower from a bouquet | remove Rose /c Red /q 5 /from Birthday Bouquet |
| | /from <bouquetName> | | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 7 | flowers | Shows a list of flowers that can be | flowers |
| | | added into mybouquets | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 8 | flowers <occasion> | Shows a list of flowers associated | flowers Valentines |
| | | with said occasion | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 9 | occasion | Shows a list of occasions associated | occasion |
| | | with available flowers | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 10 | save <bouquetName> | Saves a bouquet to an external | save Birthday Bouquet |
| | | <bouquetName>.txt file | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 11 | recommend | Recommends a bouquet based on the | recommend |
| | | chosen occasion and colour | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 12 | compare <1st flowerName> /vs/ <2nd flowerName> | Show information regarding two flowers | compare Rose /vs/ Lily |
| | | side-by-side for comparison | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 13 | bye | Exits the programme | bye |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
____________________________________________________________
What can I do for you?
Added new bouquet to list:
Expand Down
51 changes: 38 additions & 13 deletions text-ui-test/EXPECTED.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,44 @@ Hello from

Type `help`, to view a list of valid commands!
What can I do for you?
Here are the list of commands you can use:
1. new <bouquetName> - Add a bouquet
2. delete <bouquetName> - Delete a bouquets
3. mybouquets - List current saved bouquets
4. info <flowerName> - Provide information on chosen flower
5. add <flowerName> /c <colour> (optional) /q <quantity> /to <bouquetName> - add flower to a bouquet
6. remove <flowerName> /c <colour> (optional) /q <quantity> /from <bouquetName> - remove flower from a bouquet
7. flowers - Shows a list of flowers that can be added into mybouquets
8. flowers <occasion> - Shows a list of flowers associated with said occasion
9. occasion - Shows a list of occasions associated with available flowers
10. save <bouquetName> - Saves a bouquet to an external <bouquetName>.txt file
11. recommend - Recommends a bouquet based on the chosen occasion and colour
12. bye - Exits the programme
Here is the table showing a list of commands you can use:
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| No. | Command | Explanation | Example |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 1 | new <bouquetName> | Add a bouquet | new Birthday Bouquet |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 2 | delete <bouquetName> | Delete a bouquets | delete Birthday Bouquet |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 3 | mybouquets | List current saved bouquets | mybouquets |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 4 | info <flowerName> | Provide information on chosen flower | info Rose |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 5 | add <flowerName> /c <colour> (optional) /q <quantity> | Add flower to a bouquet | add Rose /c Red /q 5 /to Birthday Bouquet |
| | /to <bouquetName> | | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 6 | remove <flowerName> /c <colour> (optional) /q <quantity> | Remove flower from a bouquet | remove Rose /c Red /q 5 /from Birthday Bouquet |
| | /from <bouquetName> | | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 7 | flowers | Shows a list of flowers that can be | flowers |
| | | added into mybouquets | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 8 | flowers <occasion> | Shows a list of flowers associated | flowers Valentines |
| | | with said occasion | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 9 | occasion | Shows a list of occasions associated | occasion |
| | | with available flowers | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 10 | save <bouquetName> | Saves a bouquet to an external | save Birthday Bouquet |
| | | <bouquetName>.txt file | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 11 | recommend | Recommends a bouquet based on the | recommend |
| | | chosen occasion and colour | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 12 | compare <1st flowerName> /vs/ <2nd flowerName> | Show information regarding two flowers | compare Rose /vs/ Lily |
| | | side-by-side for comparison | |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
| 13 | bye | Exits the programme | bye |
+-----+----------------------------------------------------------+----------------------------------------+------------------------------------------------+
____________________________________________________________
What can I do for you?
Added new bouquet to list:
Expand Down

0 comments on commit c663e8c

Please sign in to comment.