Skip to content

Commit ef29c2e

Browse files
authored
Add stubs to practice exercises S to V (exercism#2192)
1 parent 9350f0e commit ef29c2e

10 files changed

Lines changed: 102 additions & 86 deletions

File tree

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
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.
7-
8-
Please remove this comment when submitting your solution.
9-
10-
*/
3+
public class Satellite {
4+
public Tree treeFromTraversals(List<Character> preorderInput, List<Character> inorderInput) {
5+
throw new UnsupportedOperationException("Please implement the Satellite.treeFromTraversals() method.");
6+
}
7+
}
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
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 Series {
4+
Series(String string) {
5+
throw new UnsupportedOperationException("Please implement the Series(string) constructor.");
6+
}
77

8-
Please remove this comment when submitting your solution.
9-
10-
*/
8+
List<String> slices(int num) {
9+
throw new UnsupportedOperationException("Please implement the Series.slices() method.");
10+
}
11+
}
Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
/*
2-
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.
7-
8-
Please remove this comment when submitting your solution.
9-
10-
*/
1+
public class SgfParsing {
2+
public SgfNode parse(String input) throws SgfParsingException {
3+
throw new UnsupportedOperationException("Please implement the SgfParsing.parse method.");
4+
}
5+
}
Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
1-
/*
1+
public class Cipher {
2+
public Cipher() {
3+
throw new UnsupportedOperationException("Please implement the Cipher() constructor.");
4+
}
25

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.
6+
public Cipher(String key) {
7+
throw new UnsupportedOperationException("Please implement the Cipher(String) constructor.");
8+
}
79

8-
Please remove this comment when submitting your solution.
10+
public String getKey() {
11+
throw new UnsupportedOperationException("Please implement the Cipher.getKey() method.");
12+
}
913

10-
*/
14+
public String encode(String plainText) {
15+
throw new UnsupportedOperationException("Please implement the Cipher.encode() method.");
16+
}
17+
18+
public String decode(String cipherText) {
19+
throw new UnsupportedOperationException("Please implement the Cipher.decode() method.");
20+
}
21+
}
Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
1-
/*
1+
class SimpleLinkedList<T> {
2+
SimpleLinkedList() {
3+
throw new UnsupportedOperationException("Please implement the SimpleLinkedList() constructor.");
4+
}
25

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.
6+
SimpleLinkedList(T[] values) {
7+
throw new UnsupportedOperationException("Please implement the SimpleLinkedList(T[]) constructor.");
8+
}
79

8-
Please remove this comment when submitting your solution.
10+
void push(T value) {
11+
throw new UnsupportedOperationException("Please implement the SimpleLinkedList.push() method.");
12+
}
913

10-
*/
14+
T pop() {
15+
throw new UnsupportedOperationException("Please implement the SimpleLinkedList.pop() method.");
16+
}
17+
18+
void reverse() {
19+
throw new UnsupportedOperationException("Please implement the SimpleLinkedList.reverse() method.");
20+
}
21+
22+
T[] asArray(Class<T> clazz) {
23+
throw new UnsupportedOperationException("Please implement the SimpleLinkedList.asArray() method.");
24+
}
25+
26+
int size() {
27+
throw new UnsupportedOperationException("Please implement the SimpleLinkedList.size() method.");
28+
}
29+
}
Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
/*
2-
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.
7-
8-
Please remove this comment when submitting your solution.
9-
10-
*/
1+
class SpiralMatrixBuilder {
2+
int[][] buildMatrixOfSize(int size) {
3+
throw new UnsupportedOperationException("Please implement the SpiralMatrixBuilder.buildMatrixOfSize() method.");
4+
}
5+
}
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
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.
7-
8-
Please remove this comment when submitting your solution.
9-
10-
*/
3+
class RelationshipComputer<T> {
4+
Relationship computeRelationship(List<T> firstList, List<T> secondList) {
5+
throw new UnsupportedOperationException("Please implement the RelationshipComputer.computeRelationship() method.");
6+
}
7+
}
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
/*
1+
class Tournament {
2+
String printTable() {
3+
throw new UnsupportedOperationException("Please implement the Tournament.printTable() method.");
4+
}
25

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.
7-
8-
Please remove this comment when submitting your solution.
9-
10-
*/
6+
void applyResults(String resultString) {
7+
throw new UnsupportedOperationException("Please implement the Tournament.applyResults() method.");
8+
}
9+
}
Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
/*
2-
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.
7-
8-
Please remove this comment when submitting your solution.
9-
10-
*/
1+
public class Transpose {
2+
public String transpose(String toTranspose) {
3+
throw new UnsupportedOperationException("Please implement the Transpose.transpose() method.");
4+
}
5+
}
Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
/*
1+
class TwoBucket {
2+
TwoBucket(int bucketOneCap, int bucketTwoCap, int desiredLiters, String startBucket) {
3+
throw new UnsupportedOperationException("Please implement the TwoBucket(int, int, int, String) constructor.");
4+
}
25

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.
6+
int getTotalMoves() {
7+
throw new UnsupportedOperationException("Please implement the TwoBucket.getTotalMoves() method.");
8+
}
79

8-
Please remove this comment when submitting your solution.
10+
String getFinalBucket() {
11+
throw new UnsupportedOperationException("Please implement the TwoBucket.getFinalBucket() method.");
12+
}
913

10-
*/
14+
int getOtherBucket() {
15+
throw new UnsupportedOperationException("Please implement the TwoBucket.getOtherBucket() method.");
16+
}
17+
}

0 commit comments

Comments
 (0)