Skip to content

Commit ce4ee91

Browse files
Done intro exercise
1 parent 707802e commit ce4ee91

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

0-0-intro/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
<artifactId>java-fundamentals-util</artifactId>
1818
<version>1.0-SNAPSHOT</version>
1919
</dependency>
20+
21+
<dependency>
22+
<groupId>org.projectlombok</groupId>
23+
<artifactId>lombok</artifactId>
24+
<version>1.18.30</version>
25+
<scope>provided</scope>
26+
</dependency>
2027
</dependencies>
2128

2229
</project>

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

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

33
import com.bobocode.util.ExerciseNotCompletedException;
4+
import java.util.Base64;
45

56
/**
67
* Welcome! This is an introduction exercise that will show you a simple example of Bobocode exercises.
@@ -23,8 +24,7 @@ public class ExerciseIntroduction {
2324
* @return "The key to efficient learning is practice!"
2425
*/
2526
public String getWelcomeMessage() {
26-
// todo: implement a method and return a message according to javadoc
27-
throw new ExerciseNotCompletedException();
27+
return "The key to efficient learning is practice!";
2828
}
2929

3030
/**
@@ -39,7 +39,6 @@ public String getWelcomeMessage() {
3939
* @return encoded message
4040
*/
4141
public String encodeMessage(String message) {
42-
// todo: switch to branch "completed" in order to see how it should be implemented
43-
throw new ExerciseNotCompletedException();
42+
return Base64.getEncoder().encodeToString(message.getBytes());
4443
}
4544
}

0 commit comments

Comments
 (0)