Skip to content

Commit 4ee13ff

Browse files
committed
Extract concepts from v2 rna-transcription exercise
1 parent 0ff138a commit 4ee13ff

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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

0 commit comments

Comments
 (0)