File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
src/main/java/com/bobocode/intro Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 11package com .bobocode .intro ;
22
33import 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}
You can’t perform that action at this time.
0 commit comments