Skip to content

Commit

Permalink
A-Packages completed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuzanwenn committed Aug 25, 2022
1 parent c3aa600 commit 0e4d4ef
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Duke project template
# duke.Duke 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/Duke.java` file, right-click it, and choose `Run 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/duke.Duke.java` file, right-click it, and choose `Run duke.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:
```
Hello from
____ _
Expand Down
4 changes: 2 additions & 2 deletions duke.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1.[D][ ] return book (by: 10月 15 2019)
2.[E][ ] return book (at: 10月 15 2019)
1.[D][X] return book (by: 10月 15 2019)
2.[D][X] return book (by: 10月 18 2019)
2 changes: 2 additions & 0 deletions src/main/java/Add.java → src/main/java/duke/Add.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package duke;

public class Add extends Task {
public String command;
public Add(String description) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package duke;

public class Deadlines extends Task {
public String command;
public int num;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/Delete.java → src/main/java/duke/Delete.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package duke;

public class Delete {
public int num;
public String command;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/Duke.java → src/main/java/duke/Duke.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package duke;

import java.io.*;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Scanner;

Expand Down Expand Up @@ -32,7 +33,6 @@ public static void main(String[] args) {
command = sc.nextLine();
Duke duke = new Duke();

// TaskList tasks = new TaskList();
while (true) {
try {
if (command.equals("bye")) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package duke;

public class DukeException extends RuntimeException {
String message;

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/Events.java → src/main/java/duke/Events.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package duke;

public class Events extends Task {
public String command;
public int num;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/Mark.java → src/main/java/duke/Mark.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package duke;

public class Mark extends Task {
public String command;
public Mark(String description) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package duke;

import java.io.*;

public class Storage {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/Task.java → src/main/java/duke/Task.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package duke;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package duke;

public class TaskList {
public String list;

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/ToDos.java → src/main/java/duke/ToDos.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package duke;

public class ToDos extends Task {
public String command;
public int num;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/Ui.java → src/main/java/duke/Ui.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package duke;

public class Ui {
public void showLoadingError() {
System.out.println("Invalid input");
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/Unmark.java → src/main/java/duke/Unmark.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package duke;

public class Unmark extends Task {
public String command;
public Unmark(String description) {
Expand Down
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 Duke < input.txt > ACTUAL.TXT
java -classpath ..\bin duke.Duke < input.txt > ACTUAL.TXT

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

0 comments on commit 0e4d4ef

Please sign in to comment.