Commit Graph
9 Commits
Author SHA1 Message Date
nocode aa52afa62c feat(morse converter): add loop for repeated conversions and improve user input handling
- Wrap main conversion logic in a while loop to allow multiple conversions
- Extract morse code output and user prompting into new showResultInConsole method
- Add input validation to ensure user enters non-empty text
- Convert user input to lowercase before processing
- Refactor translateUserSentenceToMorse to return the translated string instead of void
- Improve console UI with better formatting and title
- Move beeping and output logic from translation to display method
2026-09-14 09:55:53 +02:00
nocode 27747a3b96 feat: add character verification and refactor user input handling
- Add System.Runtime.InteropServices using statement
- Refactor askUserSentence() to return string[] instead of string
- Move userTextToAnArray() conversion into askUserSentence()
- Add new verifyUserSentence() method to validate and replace special characters
- Add console output in userTextToAnArray() to display array conversion
- Simplify main() flow by removing intermediate variable assignment
2026-09-07 10:36:14 +02:00
nocode 07afbb1486 refactor(morse): restructure program flow and improve separation of concerns
- Split main method logic into separate concerns: dictionary initialization, user input, text conversion, and translation
- Change programeDictionnary() to return dictionary instead of void
- Extract askUserSentence() to return user input string
- Extract userTextToAnArray() to return array instead of calling translation directly
- Remove debug output and dictionary printing
- Adjust Console.Beep durations: 100ms for dots, 400ms for dashes
- Improve method signatures to better reflect their responsibilities
2026-09-07 09:59:11 +02:00
nocode aa35d4a0f9 feat(morse): implement morse code translation with audio output
Refactor morse code generation to return a dictionary for reuse across methods. Add translateUserSentenceToMorse method that converts user input to morse code and plays audio beeps based on dots and dashes. Pass letterToMorse dictionary through the call chain (askUserSentence -> userTextToAnArray -> translateUserSentenceToMorse) to enable translation functionality.

Changes:
- Make programmeLetterToMorseCode public and return IDictionary
- Add morse code translation method with beep audio feedback
- Update method signatures to accept morse code dictionary
2026-09-07 09:32:28 +02:00
nocode f53c47684a feat: add method to convert user text into character array
Add new userTextToAnArray method that converts a string into an array of individual characters using LINQ Select and ToArray. This allows for character-level processing of user input.

Also add System.Linq using statement to support LINQ operations.
2026-09-07 08:46:42 +02:00
nocode ddb515f3e5 feat(PI114): add askUserSentence method for user input
Add a new static method that prompts the user to enter a sentence to decipher, reads the input from console, and displays it back. This method will be used to gather user input for the morse code translation feature.
2026-09-07 08:29:54 +02:00
nocode 489ba98991 feat(program): add morse code dictionary and refactor main into separate methods
Extract dictionary initialization into programeDictionnary() method and add programmeLetterToMorseCode() method with complete morse code mappings for letters a-z and digits 0-9. Add program header display in Main() and call to askUserSentence() to facilitate user interaction flow.
2026-09-07 08:29:04 +02:00
nocode f3c5bf70b9 feat: add morse code converter with special character mapping
Implement initial version of text to Morse code conversion algorithm. Includes a dictionary for mapping accented characters to their base equivalents (e.g., é, è, ê, ë to e). Currently demonstrates the special character dictionary functionality by iterating and printing key-value pairs.
2026-08-31 10:18:13 +02:00
nocode 699c32f05e feat: initialize new console application project
Create a new .NET console application project with basic configuration and hello world example. Sets up the project structure with net10.0 target framework, implicit usings, and nullable reference types enabled.
2026-08-24 10:08:18 +02:00