Skip to content

Commit

Permalink
Rename bot to pingmebot, created JAR file
Browse files Browse the repository at this point in the history
  • Loading branch information
cheahTJ committed Feb 1, 2024
1 parent ea0f4ca commit 766b6c1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pingmebot.Duke project template
# pingmebot.Pingme project template

This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it.

Expand All @@ -13,7 +13,7 @@ Prerequisites: JDK 11, update Intellij to the most recent version.
1. If there are any further prompts, accept the defaults.
1. Configure the project to use **JDK 11** (not other versions) as explained in [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk).<br>
In the same dialog, set the **Project language level** field to the `SDK default` option.
3. After that, locate the `src/main/java/pingmebot.Duke.java` file, right-click it, and choose `Run pingmebot.Duke.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output:
3. After that, locate the `src/main/java/pingmebot.Pingme.java` file, right-click it, and choose `Run pingmebot.Pingme.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output:
```
Hello from
____ _
Expand Down
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,15 @@ test {
}

application {
mainClass.set("seedu.duke.Duke")
mainClass.set("pingmebot.Pingme")
}

shadowJar {
archiveBaseName = "duke"
archiveBaseName = "pingmebot"
archiveClassifier = null
dependsOn("distZip", "distTar")
}

run{
standardInput = System.in
enableAssertions = true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import pingmebot.task.Events;
import pingmebot.task.ToDos;

public class Duke {
public class Pingme {
private fileStorage storage;
private TaskList tasks;
private UI ui;
private Parser parser;

public Duke(String filePath) {
public Pingme(String filePath) {
this.ui = new UI();
try {
this.storage = new fileStorage(filePath);
Expand Down Expand Up @@ -92,6 +92,6 @@ public void run() {
}

public static void main(String[] args) {
new Duke("./data/dukeData.txt").run();
new Pingme("./data/dukeData.txt").run();
}
}
2 changes: 1 addition & 1 deletion text-ui-test/runtest.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ IF ERRORLEVEL 1 (
REM no error here, errorlevel == 0

REM run the program, feed commands from input.txt file and redirect the output to the ACTUAL.TXT
java -classpath ..\bin pingmebot.Duke < input.txt > ACTUAL.TXT
java -classpath ..\bin pingmebot.Pingme < input.txt > ACTUAL.TXT

REM compare the output to the expected output
FC ACTUAL.TXT EXPECTED.TXT

0 comments on commit 766b6c1

Please sign in to comment.