From 16e1110885e1c180ba3a9b9da6521384fab4f905 Mon Sep 17 00:00:00 2001 From: YHWong20 Date: Mon, 11 Mar 2024 15:53:02 +0800 Subject: [PATCH 1/4] Update package names --- src/main/java/seedu/{duke => binbash}/Duke.java | 2 +- src/test/java/seedu/{duke => binbash}/DukeTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/main/java/seedu/{duke => binbash}/Duke.java (96%) rename src/test/java/seedu/{duke => binbash}/DukeTest.java (89%) diff --git a/src/main/java/seedu/duke/Duke.java b/src/main/java/seedu/binbash/Duke.java similarity index 96% rename from src/main/java/seedu/duke/Duke.java rename to src/main/java/seedu/binbash/Duke.java index 5c74e68d59..a00833698e 100644 --- a/src/main/java/seedu/duke/Duke.java +++ b/src/main/java/seedu/binbash/Duke.java @@ -1,4 +1,4 @@ -package seedu.duke; +package seedu.binbash; import java.util.Scanner; diff --git a/src/test/java/seedu/duke/DukeTest.java b/src/test/java/seedu/binbash/DukeTest.java similarity index 89% rename from src/test/java/seedu/duke/DukeTest.java rename to src/test/java/seedu/binbash/DukeTest.java index 2dda5fd651..334f1ce025 100644 --- a/src/test/java/seedu/duke/DukeTest.java +++ b/src/test/java/seedu/binbash/DukeTest.java @@ -1,4 +1,4 @@ -package seedu.duke; +package seedu.binbash; import static org.junit.jupiter.api.Assertions.assertTrue; From 203eee395e808ef4f58634f2ae8de73c7f58dd2d Mon Sep 17 00:00:00 2001 From: YHWong20 Date: Mon, 11 Mar 2024 15:53:35 +0800 Subject: [PATCH 2/4] Add ItemList class --- src/main/java/seedu/binbash/ItemList.java | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/main/java/seedu/binbash/ItemList.java diff --git a/src/main/java/seedu/binbash/ItemList.java b/src/main/java/seedu/binbash/ItemList.java new file mode 100644 index 0000000000..30ff109fd5 --- /dev/null +++ b/src/main/java/seedu/binbash/ItemList.java @@ -0,0 +1,28 @@ +package seedu.binbash; + +import java.util.List; +import java.util.ArrayList; + +public class ItemList { + private final List itemList; + + public ItemList() { + itemList = new ArrayList<>(); + } + + public List getItemList() { + return itemList; + } + + /** + * Test method + */ + public void addItem(Item item) { + itemList.add(item); + } + + @Override + public String toString() { + return itemList.toString(); + } +} From 4647893b7e2166dafd2e99bc3eecb710d9282255 Mon Sep 17 00:00:00 2001 From: YHWong20 Date: Mon, 11 Mar 2024 15:53:43 +0800 Subject: [PATCH 3/4] Add Item class --- src/main/java/seedu/binbash/Item.java | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/main/java/seedu/binbash/Item.java diff --git a/src/main/java/seedu/binbash/Item.java b/src/main/java/seedu/binbash/Item.java new file mode 100644 index 0000000000..55c35ab8a6 --- /dev/null +++ b/src/main/java/seedu/binbash/Item.java @@ -0,0 +1,24 @@ +package seedu.binbash; + +public class Item { + private final String itemName; + private final String itemDescription; + + public Item(String itemName, String itemDescription) { + this.itemName = itemName; + this.itemDescription = itemDescription; + } + + public String getItemName() { + return itemName; + } + + public String getItemDescription() { + return itemDescription; + } + + @Override + public String toString() { + return itemName + ": " + itemDescription; + } +} From 0d4df548ad014c86ba78ef8eb31e8eaa57537815 Mon Sep 17 00:00:00 2001 From: YHWong20 Date: Mon, 11 Mar 2024 16:39:16 +0800 Subject: [PATCH 4/4] Update application name in gradle config --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ea82051fab..77a37dc021 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ test { } application { - mainClass.set("seedu.duke.Duke") + mainClass.set("seedu.binbash.Duke") } shadowJar {