Skip to content

Commit 37f47a7

Browse files
DWalzSleeplessBytesanderploegsma
authored
Exercise stubs for missing exercises (exercism#2319)
* Add exercise stub for 'all-your-base' exercise * Add exercise stub for 'alphametics' exercise * Add exercise stub for 'anagram' exercise * Add exercise stub for 'atbash' exercise * Add exercise stub for 'bank-account' exercise * Add exercise stub for 'beer-song' exercise * Add exercise stub for 'bob' exercise * Add exercise stub for 'book-store' exercise * Add exercise stub for 'bowling' exercise * Add exercise stub for 'change' exercise * Add exercise stub for 'clock' exercise * Add exercise stub for 'complex' exercise * Add exercise stub for 'crypto-square' exercise * Add exercise stub for 'custom-set' exercise * Add exercise stub for 'diffie-hellman' exercise * Add exercise stub for 'dominoes' exercise * Add exercise stub for 'food-chain' exercise * Add exercise stub for 'flatten' exercise * Add exercise stub for 'go-counting' exercise * Add exercise stub for 'grade-school' exercise * Add exercise stub for 'grep' exercise * Add exercise stub for 'hangman' exercise * Add exercise stub for 'house' exercise * Add exercise stub for 'knapsack' exercise * Add exercise stub for 'matching-brackets' exercise * Add exercise stub for 'meetup' exercise * Add exercise stub for 'minesweeper' exercise * Add exercise stub for 'nucleotide-count' exercise * Add exercise stub for 'ocr-numbers' exercise * Add exercise stub for 'palindrome-products' exercise * Add exercise stub for 'parallel-letter-frequency' exercise * Add exercise stub for 'pascals-triangle' exercise * Add exercise stub for 'phone-number' exercise * Add exercise stub for 'poker' exercise * Add exercise stub for 'prime-factors' exercise * Add exercise stub for 'pythagorean-triplet' exercise * Fix formatting in 'prime-factors' * Add exercise stub for 'queen-attack' exercise * Add exercise stub for 'rail-fence-cipher' exercise * Add exercise stub for 'rectangles' exercise * Add exercise stub for 'rest-api' exercise * Add exercise stub for 'robot-simulator' exercise Maybe we want to change the return type of the move functions to allow for method chaining like the solution suggests - it is not strictly necessary to sucessfully run the tests * Add exercise stub for 'robot-name' exercise * Add exercise stub for 'roman-numerals' exercise * Add exercise stub for 'run-length-encoding' exercise * Make function parameters not final * Fix Gradle dependencies in starterSource source sets Projects that add external dependencies using the `implementation` dependency configuration in their build.gradle file didn't get those dependencies installed when building the 'starterSource' source sets in CI. * Add missing Item class for knapsack exercise * Add new files to exercise config --------- Co-authored-by: Derk-Jan Karrenbeld <derk-jan+github@karrenbeld.info> Co-authored-by: Sander Ploegsma <sanderploegsma@gmail.com>
1 parent 49a150f commit 37f47a7

50 files changed

Lines changed: 558 additions & 318 deletions

File tree

Some content is hidden

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

exercises/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ subprojects {
5757
logCompileTaskSourcePath(project, "compileJava") // Corresponds to the "main" source set.
5858
logCompileTaskSourcePath(project, "compileStarterSourceJava")
5959
logCompileTaskSourcePath(project, "compileTestJava")
60+
}
6061

62+
configurations {
63+
starterSourceImplementation.extendsFrom implementation
6164
}
6265

6366
// configuration of the linter
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
/*
1+
class BaseConverter {
22

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

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

10-
*/
11+
}
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
/*
1+
import java.util.Map;
22

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

8-
Please remove this comment when submitting your solution.
5+
Alphametics(String userInput) {
6+
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
7+
}
98

10-
*/
9+
Map<Character, Integer> solve() throws UnsolvablePuzzleException {
10+
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
11+
}
12+
13+
}
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
/*
1+
class Atbash {
22

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

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

10-
*/
11+
}
Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1-
/*
1+
class BankAccount {
22

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

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

10-
*/
11+
synchronized int getBalance() throws BankAccountActionInvalidException {
12+
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
13+
}
14+
15+
synchronized void deposit(int amount) throws BankAccountActionInvalidException {
16+
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
17+
}
18+
19+
synchronized void withdraw(int amount) throws BankAccountActionInvalidException {
20+
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
21+
}
22+
23+
}
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
/*
1+
class BeerSong {
22

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

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

10-
*/
11+
}
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
/*
1+
class Bob {
22

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

8-
Please remove this comment when submitting your solution.
9-
10-
*/
7+
}
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
/*
1+
import java.util.List;
22

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

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

10-
*/
9+
}
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
/*
1+
class BowlingGame {
22

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

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

10-
*/
11+
}
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
/*
1+
import java.util.List;
22

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

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

10-
*/
9+
List<Integer> computeMostEfficientChange(int grandTotal) {
10+
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
11+
}
12+
13+
}

0 commit comments

Comments
 (0)