Skip to content

Commit f933d18

Browse files
committed
Виконані вправи 0-0 intro
1 parent 707802e commit f933d18

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.bobocode.intro;
22

3-
import com.bobocode.util.ExerciseNotCompletedException;
3+
import java.util.Base64;
44

55
/**
66
* Welcome! This is an introduction exercise that will show you a simple example of Bobocode exercises.
@@ -23,8 +23,7 @@ public class ExerciseIntroduction {
2323
* @return "The key to efficient learning is practice!"
2424
*/
2525
public String getWelcomeMessage() {
26-
// todo: implement a method and return a message according to javadoc
27-
throw new ExerciseNotCompletedException();
26+
return "The key to efficient learning is practice!";
2827
}
2928

3029
/**
@@ -39,7 +38,6 @@ public String getWelcomeMessage() {
3938
* @return encoded message
4039
*/
4140
public String encodeMessage(String message) {
42-
// todo: switch to branch "completed" in order to see how it should be implemented
43-
throw new ExerciseNotCompletedException();
41+
return Base64.getEncoder().encodeToString(message.getBytes());
4442
}
4543
}

0 commit comments

Comments
 (0)