Skip to content

Commit 00a226b

Browse files
adminadmin
authored andcommitted
Виконані завдання з java-fundamentals-exercises
1 parent 707802e commit 00a226b

File tree

81 files changed

+4
-35
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+4
-35
lines changed

.DS_Store

10 KB
Binary file not shown.

0-0-intro/.DS_Store

6 KB
Binary file not shown.

0-0-intro/src/.DS_Store

6 KB
Binary file not shown.

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

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,13 @@
22

33
import com.bobocode.util.ExerciseNotCompletedException;
44

5-
/**
6-
* Welcome! This is an introduction exercise that will show you a simple example of Bobocode exercises.
7-
* <p>
8-
* JavaDoc is a way of communication with other devs. We use Java Docs in every exercise to define the task.
9-
* So PLEASE MAKE SURE you read the Java Docs carefully.
10-
* <p>
11-
* Every exercise is covered with tests, see {@link ExerciseIntroductionTest}.
12-
* <p>
13-
* In this repo you'll find dozens of exercises covering various fundamental topics.
14-
* They all have the same structure helping you to focus on practice and build strong skills!
15-
*
16-
* @author Taras Boychuk
17-
*/
5+
import java.util.Base64;
6+
187
public class ExerciseIntroduction {
19-
/**
20-
* This method returns a very important message. If understood well, it can save you years of inefficient learning,
21-
* and unlock your potential!
22-
*
23-
* @return "The key to efficient learning is practice!"
24-
*/
258
public String getWelcomeMessage() {
26-
// todo: implement a method and return a message according to javadoc
27-
throw new ExerciseNotCompletedException();
9+
return "The key to efficient learning is practice!";
2810
}
29-
30-
/**
31-
* Method encodeMessage accepts one {@link String} parameter and returns encoded {@link String}.
32-
* <p>
33-
* PLEASE NOTE THAT YOU WILL GET STUCK ON THIS METHOD INTENTIONALLY! ;)
34-
* <p>
35-
* Every exercise has a completed solution that is stored in the branch "completed". So in case you got stuck
36-
* and don't know what to do, go check out completed solution.
37-
*
38-
* @param message input message
39-
* @return encoded message
40-
*/
4111
public String encodeMessage(String message) {
42-
// todo: switch to branch "completed" in order to see how it should be implemented
43-
throw new ExerciseNotCompletedException();
12+
return Base64.getEncoder().encodeToString(message.getBytes());
4413
}
4514
}

1-0-java-basics/.DS_Store

8 KB
Binary file not shown.
6 KB
Binary file not shown.
6 KB
Binary file not shown.
6 KB
Binary file not shown.
6 KB
Binary file not shown.
6 KB
Binary file not shown.

0 commit comments

Comments
 (0)