File tree Expand file tree Collapse file tree
reference/exercise-concepts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Rna-transcription
2+
3+ [ Example implementation] ( https://github.com/exercism/java/blob/master/exercises/rna-transcription/.meta/src/reference/java/RnaTranscription.java )
4+
5+ ## General
6+
7+ - Class: define a class to resolve the problem
8+ - Methods: define a method to contain the logic
9+ - Argument: the method should take the input as argument
10+ - Strings: input and output of the class method are strings
11+ - Assignment: assign some objects to local variables
12+ - Variables: define references to created objects
13+ - Loops: iterate on every character of the input string
14+ - Objects: create a object of class ` StringBuilder ` to store the transcription
15+ - Return values: method should return the final transcription
16+ - Pattern matching: match the right operation to execute depending on the input value
17+ - Error handling: manage the scenario when an invalid value is found
18+
19+ ## Approach: Use conditional
20+ - use conditional instead of pattern matching to choose the right operation to execute for the input value
21+
22+ ## Approach: functional style
23+ - use stream instead of loops to iterate on input values and map operation with a method reference to transform the data
You can’t perform that action at this time.
0 commit comments