From 84f1c2bb8656de59f7cc804d12daf68b0f445ce2 Mon Sep 17 00:00:00 2001 From: Gleb Koval Date: Tue, 5 Nov 2024 16:17:54 +0000 Subject: [PATCH] Create ReveresePolishStack, which is empty on creation. Co-Authored-By: td1223 --- src/main/java/ic/doc/README.txt | 2 -- src/main/java/ic/doc/ReversePolishStack.java | 7 +++++++ src/test/java/ic/doc/README.txt | 2 -- src/test/java/ic/doc/ReversePolishStackTest.java | 15 +++++++++++++++ 4 files changed, 22 insertions(+), 4 deletions(-) delete mode 100644 src/main/java/ic/doc/README.txt create mode 100644 src/main/java/ic/doc/ReversePolishStack.java delete mode 100644 src/test/java/ic/doc/README.txt create mode 100644 src/test/java/ic/doc/ReversePolishStackTest.java diff --git a/src/main/java/ic/doc/README.txt b/src/main/java/ic/doc/README.txt deleted file mode 100644 index f2127d4..0000000 --- a/src/main/java/ic/doc/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -Put your implementation code in this directory. -Delete this file before submission. diff --git a/src/main/java/ic/doc/ReversePolishStack.java b/src/main/java/ic/doc/ReversePolishStack.java new file mode 100644 index 0000000..fc0d0a0 --- /dev/null +++ b/src/main/java/ic/doc/ReversePolishStack.java @@ -0,0 +1,7 @@ +package ic.doc; + +public class ReversePolishStack { + public int getSize() { + return 0; + } +} diff --git a/src/test/java/ic/doc/README.txt b/src/test/java/ic/doc/README.txt deleted file mode 100644 index 6719ce3..0000000 --- a/src/test/java/ic/doc/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -Put your test code in this directory. -Delete this file before submission. diff --git a/src/test/java/ic/doc/ReversePolishStackTest.java b/src/test/java/ic/doc/ReversePolishStackTest.java new file mode 100644 index 0000000..5fff47e --- /dev/null +++ b/src/test/java/ic/doc/ReversePolishStackTest.java @@ -0,0 +1,15 @@ +package ic.doc; + +import org.junit.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; + +public class ReversePolishStackTest { + final ReversePolishStack reversePolishStack = new ReversePolishStack(); + + @Test + public void reversePolishStackEmptyInitially() { + assertThat(reversePolishStack.getSize(), is(0)); + } +}