Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
4154485
Add exercise stub for 'all-your-base' exercise
DWalz Jun 7, 2023
3928d7e
Add exercise stub for 'alphametics' exercise
DWalz Jun 7, 2023
4109a02
Add exercise stub for 'anagram' exercise
DWalz Jun 7, 2023
0a1b127
Add exercise stub for 'atbash' exercise
DWalz Jun 7, 2023
ed1a797
Add exercise stub for 'bank-account' exercise
DWalz Jun 7, 2023
3ec2723
Add exercise stub for 'beer-song' exercise
DWalz Jun 7, 2023
b43b6b0
Add exercise stub for 'bob' exercise
DWalz Jun 7, 2023
d1f10ea
Add exercise stub for 'book-store' exercise
DWalz Jun 7, 2023
c7c537a
Add exercise stub for 'bowling' exercise
DWalz Jun 7, 2023
a00b9c1
Add exercise stub for 'change' exercise
DWalz Jun 7, 2023
3acf5bd
Add exercise stub for 'clock' exercise
DWalz Jun 7, 2023
490a50b
Add exercise stub for 'complex' exercise
DWalz Jun 7, 2023
e4f3d84
Add exercise stub for 'crypto-square' exercise
DWalz Jun 7, 2023
82dc7d4
Add exercise stub for 'custom-set' exercise
DWalz Jun 7, 2023
76e3838
Add exercise stub for 'diffie-hellman' exercise
DWalz Jun 7, 2023
0cfca42
Add exercise stub for 'dominoes' exercise
DWalz Jun 7, 2023
6b28214
Add exercise stub for 'food-chain' exercise
DWalz Jun 7, 2023
d30c5aa
Add exercise stub for 'flatten' exercise
DWalz Jun 7, 2023
3bf4ad8
Add exercise stub for 'go-counting' exercise
DWalz Jun 7, 2023
30f3602
Add exercise stub for 'grade-school' exercise
DWalz Jun 7, 2023
1961dba
Add exercise stub for 'grep' exercise
DWalz Jun 7, 2023
6d43c84
Add exercise stub for 'hangman' exercise
DWalz Jun 7, 2023
0da57fd
Add exercise stub for 'house' exercise
DWalz Jun 7, 2023
820aa54
Add exercise stub for 'knapsack' exercise
DWalz Jun 7, 2023
d805c21
Add exercise stub for 'matching-brackets' exercise
DWalz Jun 7, 2023
8c4ed40
Add exercise stub for 'meetup' exercise
DWalz Jun 7, 2023
5f341c8
Add exercise stub for 'minesweeper' exercise
DWalz Jun 7, 2023
1c6727e
Add exercise stub for 'nucleotide-count' exercise
DWalz Jun 7, 2023
829601c
Add exercise stub for 'ocr-numbers' exercise
DWalz Jun 7, 2023
8d9c86a
Add exercise stub for 'palindrome-products' exercise
DWalz Jun 7, 2023
2b6987c
Add exercise stub for 'parallel-letter-frequency' exercise
DWalz Jun 7, 2023
bb285c4
Add exercise stub for 'pascals-triangle' exercise
DWalz Jun 7, 2023
c5548cc
Add exercise stub for 'phone-number' exercise
DWalz Jun 7, 2023
71254b9
Add exercise stub for 'poker' exercise
DWalz Jun 7, 2023
12de740
Add exercise stub for 'prime-factors' exercise
DWalz Jun 7, 2023
dad1ece
Add exercise stub for 'pythagorean-triplet' exercise
DWalz Jun 7, 2023
1da6ea3
Fix formatting in 'prime-factors'
DWalz Jun 7, 2023
c8c71a7
Add exercise stub for 'queen-attack' exercise
DWalz Jun 7, 2023
eacec26
Add exercise stub for 'rail-fence-cipher' exercise
DWalz Jun 7, 2023
467b161
Add exercise stub for 'rectangles' exercise
DWalz Jun 7, 2023
fe91932
Add exercise stub for 'rest-api' exercise
DWalz Jun 7, 2023
c9ccb39
Add exercise stub for 'robot-simulator' exercise
DWalz Jun 7, 2023
683e4ed
Add exercise stub for 'robot-name' exercise
DWalz Jun 7, 2023
5fdcfe6
Add exercise stub for 'roman-numerals' exercise
DWalz Jun 7, 2023
4c1835a
Add exercise stub for 'run-length-encoding' exercise
DWalz Jun 7, 2023
5b97a5b
Make function parameters not final
DWalz Jun 11, 2023
56be37c
Merge branch 'main' into exercise-stubs
SleeplessByte Aug 24, 2023
6a5d7f2
Fix Gradle dependencies in starterSource source sets
sanderploegsma Aug 26, 2023
c25e82f
Add missing Item class for knapsack exercise
DWalz Aug 26, 2023
b5ab85a
Add new files to exercise config
DWalz Aug 26, 2023
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
3 changes: 3 additions & 0 deletions exercises/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ subprojects {
logCompileTaskSourcePath(project, "compileJava") // Corresponds to the "main" source set.
logCompileTaskSourcePath(project, "compileStarterSourceJava")
logCompileTaskSourcePath(project, "compileTestJava")
}

configurations {
starterSourceImplementation.extendsFrom implementation
}

// configuration of the linter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/*
class BaseConverter {

Since this exercise has a difficulty of > 4 it doesn't come
with any starter implementation.
This is so that you get to practice creating classes and methods
which is an important part of programming in Java.
BaseConverter(int originalBase, int[] originalDigits) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

Please remove this comment when submitting your solution.
int[] convertToBase(int newBase) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

*/
}
17 changes: 10 additions & 7 deletions exercises/practice/alphametics/src/main/java/Alphametics.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
/*
import java.util.Map;

Since this exercise has a difficulty of > 4 it doesn't come
with any starter implementation.
This is so that you get to practice creating classes and methods
which is an important part of programming in Java.
class Alphametics {

Please remove this comment when submitting your solution.
Alphametics(String userInput) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

*/
Map<Character, Integer> solve() throws UnsolvablePuzzleException {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

}
15 changes: 8 additions & 7 deletions exercises/practice/atbash-cipher/src/main/java/Atbash.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/*
class Atbash {

Since this exercise has a difficulty of > 4 it doesn't come
with any starter implementation.
This is so that you get to practice creating classes and methods
which is an important part of programming in Java.
String encode(String input) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

Please remove this comment when submitting your solution.
String decode(String input) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

*/
}
27 changes: 20 additions & 7 deletions exercises/practice/bank-account/src/main/java/BankAccount.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
/*
class BankAccount {

Since this exercise has a difficulty of > 4 it doesn't come
with any starter implementation.
This is so that you get to practice creating classes and methods
which is an important part of programming in Java.
void open() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

Please remove this comment when submitting your solution.
void close() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

*/
synchronized int getBalance() throws BankAccountActionInvalidException {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

synchronized void deposit(int amount) throws BankAccountActionInvalidException {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

synchronized void withdraw(int amount) throws BankAccountActionInvalidException {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

}
15 changes: 8 additions & 7 deletions exercises/practice/beer-song/src/main/java/BeerSong.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/*
class BeerSong {

Since this exercise has a difficulty of > 4 it doesn't come
with any starter implementation.
This is so that you get to practice creating classes and methods
which is an important part of programming in Java.
String sing(int startBottles, int takeDown) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

Please remove this comment when submitting your solution.
String singSong() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

*/
}
13 changes: 5 additions & 8 deletions exercises/practice/bob/src/main/java/Bob.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
/*
class Bob {

Since this exercise has a difficulty of > 4 it doesn't come
with any starter implementation.
This is so that you get to practice creating classes and methods
which is an important part of programming in Java.
String hey(String input) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

Please remove this comment when submitting your solution.

*/
}
13 changes: 6 additions & 7 deletions exercises/practice/book-store/src/main/java/BookStore.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/*
import java.util.List;

Since this exercise has a difficulty of > 4 it doesn't come
with any starter implementation.
This is so that you get to practice creating classes and methods
which is an important part of programming in Java.
class BookStore {

Please remove this comment when submitting your solution.
double calculateBasketCost(List<Integer> books) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

*/
}
15 changes: 8 additions & 7 deletions exercises/practice/bowling/src/main/java/BowlingGame.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/*
class BowlingGame {

Since this exercise has a difficulty of > 4 it doesn't come
with any starter implementation.
This is so that you get to practice creating classes and methods
which is an important part of programming in Java.
void roll(int pins) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

Please remove this comment when submitting your solution.
int score() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

*/
}
17 changes: 10 additions & 7 deletions exercises/practice/change/src/main/java/ChangeCalculator.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
/*
import java.util.List;

Since this exercise has a difficulty of > 4 it doesn't come
with any starter implementation.
This is so that you get to practice creating classes and methods
which is an important part of programming in Java.
class ChangeCalculator {

Please remove this comment when submitting your solution.
ChangeCalculator(List<Integer> currencyCoins) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

*/
List<Integer> computeMostEfficientChange(int grandTotal) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

}
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
/*
class CircularBuffer<T> {

Since this exercise has a difficulty of > 4 it doesn't come
with any starter implementation.
This is so that you get to practice creating classes and methods
which is an important part of programming in Java.
CircularBuffer(final int size) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

Please remove this comment when submitting your solution.
T read() throws BufferIOException {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

*/
void write(T data) throws BufferIOException {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

void overwrite(T data) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

void clear() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

}
25 changes: 18 additions & 7 deletions exercises/practice/clock/src/main/java/Clock.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
/*
class Clock {

Since this exercise has a difficulty of > 4 it doesn't come
with any starter implementation.
This is so that you get to practice creating classes and methods
which is an important part of programming in Java.
Clock(int hours, int minutes) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

Please remove this comment when submitting your solution.
void add(int minutes) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

*/
@Override
public String toString() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

@Override
public boolean equals(Object obj) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

}
Original file line number Diff line number Diff line change
@@ -1,10 +1,51 @@
/*
class ComplexNumber {

Since this exercise has a difficulty of > 4 it doesn't come
with any starter implementation.
This is so that you get to practice creating classes and methods
which is an important part of programming in Java.
ComplexNumber(double real, double imag) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

Please remove this comment when submitting your solution.
double getReal() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

*/
double getImag() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

double abs() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

ComplexNumber add(ComplexNumber other) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

ComplexNumber minus(ComplexNumber other) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

ComplexNumber times(ComplexNumber other) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

ComplexNumber times(double factor) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

ComplexNumber div(ComplexNumber other) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

ComplexNumber div(double divisor) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

ComplexNumber conjugate() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

ComplexNumber exponentialOf() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

}
15 changes: 8 additions & 7 deletions exercises/practice/crypto-square/src/main/java/CryptoSquare.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/*
class CryptoSquare {

Since this exercise has a difficulty of > 4 it doesn't come
with any starter implementation.
This is so that you get to practice creating classes and methods
which is an important part of programming in Java.
CryptoSquare(String plaintext) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

Please remove this comment when submitting your solution.
String getCiphertext() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

*/
}
50 changes: 43 additions & 7 deletions exercises/practice/custom-set/src/main/java/CustomSet.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,46 @@
/*
import java.util.Collection;

Since this exercise has a difficulty of > 4 it doesn't come
with any starter implementation.
This is so that you get to practice creating classes and methods
which is an important part of programming in Java.
class CustomSet<T> {

Please remove this comment when submitting your solution.
CustomSet() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

*/
CustomSet(Collection<T> data) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

boolean isEmpty() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

boolean contains(T element) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

boolean isDisjoint(CustomSet<T> other) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

boolean add(T element) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

@Override
public boolean equals(Object obj) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

CustomSet<T> getIntersection(CustomSet<T> other) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

CustomSet<T> getUnion(CustomSet<T> other) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

CustomSet<T> getDifference(CustomSet<T> other) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

}
Loading