Skip to content

Commit eb51adc

Browse files
committed
Complete 0-0-intro exercise
1 parent 707802e commit eb51adc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

0-0-intro/src/main/java/com/bobocode/intro/ExerciseIntroduction.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import com.bobocode.util.ExerciseNotCompletedException;
44

5+
import java.util.Base64;
6+
57
/**
68
* Welcome! This is an introduction exercise that will show you a simple example of Bobocode exercises.
79
* <p>
@@ -23,8 +25,7 @@ public class ExerciseIntroduction {
2325
* @return "The key to efficient learning is practice!"
2426
*/
2527
public String getWelcomeMessage() {
26-
// todo: implement a method and return a message according to javadoc
27-
throw new ExerciseNotCompletedException();
28+
return "The key to efficient learning is practice!";
2829
}
2930

3031
/**
@@ -39,7 +40,6 @@ public String getWelcomeMessage() {
3940
* @return encoded message
4041
*/
4142
public String encodeMessage(String message) {
42-
// todo: switch to branch "completed" in order to see how it should be implemented
43-
throw new ExerciseNotCompletedException();
43+
return Base64.getEncoder().encodeToString(message.getBytes());
4444
}
4545
}

0 commit comments

Comments
 (0)