Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import com.bobocode.util.ExerciseNotCompletedException;

import java.util.Base64;

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

/**
Expand All @@ -40,6 +43,7 @@ public String getWelcomeMessage() {
*/
public String encodeMessage(String message) {
// todo: switch to branch "completed" in order to see how it should be implemented
throw new ExerciseNotCompletedException();
// throw new ExerciseNotCompletedException();
return Base64.getEncoder().encodeToString(message.getBytes());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
* <p>
* todo: refactor this class so it uses generic type "T" and run {@link com.bobocode.basics.BoxTest} to verify it
*/
public class Box {
private Object value;
public class Box<T> {
private T value;

public Box(Object value) {
public Box(T value) {
this.value = value;
}

public Object getValue() {
public T getValue() {
return value;
}

public void setValue(Object value) {
public void setValue(T value) {
this.value = value;
}
}
Loading