Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Quek Sze Long] iP #465

Open
wants to merge 59 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
d839859
Add Gradle support
May 24, 2020
ffbecea
Implement Duke Level 1
szelongq Aug 18, 2021
e72fa50
Implement Duke Level 2
szelongq Aug 18, 2021
f2d6f5c
Implement Duke Level 3
szelongq Aug 18, 2021
cf42835
Implement Duke Level-4
szelongq Aug 18, 2021
7971be8
Implement Automated Text UI Testing
szelongq Aug 18, 2021
6cb9d21
Implement Duke Level 5
szelongq Aug 18, 2021
196ad71
Implement Duke Level 6
szelongq Aug 18, 2021
d86c5b7
Implement Enums for Task Types
szelongq Aug 18, 2021
5e5d767
Fix Bugs from Level 6
szelongq Aug 26, 2021
a5ff454
Implement Duke Level 7
szelongq Aug 26, 2021
1134b9e
Implement Duke Level 8
szelongq Aug 26, 2021
07c8889
Merge branch 'branch-level-7'
szelongq Aug 26, 2021
4fec8b9
Merge branch 'branch-Level-8'
szelongq Aug 26, 2021
d2844fe
Fix Bug from Merge with Level-7 and Level-8
szelongq Aug 26, 2021
f381098
Update Delete Feature to be work with Save Feature.
szelongq Aug 26, 2021
9a6f675
Add Ui, Storage and LoadingException Classes
szelongq Aug 26, 2021
091f13a
Implement Duke A-MoreOOP
szelongq Aug 26, 2021
0cd6d66
Implement A-Packages
szelongq Aug 26, 2021
b827472
Implement Duke A-JUnit
szelongq Aug 26, 2021
6c77dc9
Fix bug for when directory folder does not exist
szelongq Aug 26, 2021
ba8c40d
Implement Duke A-JavaDoc
szelongq Aug 27, 2021
269836a
Implement Duke A-CodingStandard
szelongq Aug 28, 2021
9473c7d
Implement Duke Level 9
szelongq Aug 28, 2021
47bcbfe
Merge branch 'branch-A-JavaDoc'
szelongq Aug 28, 2021
e38c688
Merge branch 'branch-A-CodingStandard'
szelongq Aug 28, 2021
e2fa3b0
Merge branch 'branch-Level-9'
szelongq Aug 28, 2021
113c0ba
Update Code as per Reviews.
szelongq Aug 31, 2021
55aeb9d
Edit Code to Fit Coding Standard and Enhance Readability.
szelongq Sep 1, 2021
c1f35d1
Merge remote-tracking branch 'origin/add-gradle-support' into branch-…
szelongq Sep 1, 2021
58690d1
Implement Duke A-Gradle
szelongq Sep 1, 2021
9b353e5
Merge branch 'branch-A-Gradle'
szelongq Sep 1, 2021
a908b8d
Implement A-CheckStyle
szelongq Sep 1, 2021
d715bd1
Merge branch 'branch-A-CheckStyle'
szelongq Sep 1, 2021
f058d9d
Implement Duke Level 10
szelongq Sep 2, 2021
2920388
Merge branch 'branch-Level-10'
szelongq Sep 2, 2021
938b890
Fix bugs preventing JAR file generation.
szelongq Sep 8, 2021
f9939fc
Use Assertions
szelongq Sep 8, 2021
046b9cf
Parser class: move parsing of TaskType to TaskType class
szelongq Sep 8, 2021
d03c6ee
Storage class: create a new method for parsing a saved task
szelongq Sep 8, 2021
8b8c55c
Improve code readability
szelongq Sep 8, 2021
51866b8
Merge pull request #1 from szelongq/branch-A-Assertions
szelongq Sep 8, 2021
e524958
Merge branch 'master' into branch-A-CodeQuality
szelongq Sep 8, 2021
798da13
Merge pull request #2 from szelongq/branch-A-CodeQuality
szelongq Sep 8, 2021
05a3a98
Create main.yml
szelongq Sep 9, 2021
6c481ea
Add whitespaces to follow checkstyle format
szelongq Sep 9, 2021
f9c1232
Merge pull request #3 from szelongq/branch-A-CI
szelongq Sep 9, 2021
b3b4ba9
Add ability for the user to change the target save file
szelongq Sep 9, 2021
8202463
Add javadoc comments
szelongq Sep 9, 2021
b912ebd
Merge pull request #4 from szelongq/branch-C-FlexibleDataSource
szelongq Sep 9, 2021
98722d3
Improve GUI
szelongq Sep 17, 2021
c603d3c
Merge pull request #6 from szelongq/branch-A-BetterGui
szelongq Sep 17, 2021
aa78d57
Rebrand Duke as Tipsy
szelongq Sep 17, 2021
2985e87
Fix Checkstyle Errors
szelongq Sep 17, 2021
b604602
Merge pull request #7 from szelongq/branch-Rebranding
szelongq Sep 17, 2021
df5cd71
Update README.md
szelongq Sep 17, 2021
d31778e
Add Product Screenshot
szelongq Sep 18, 2021
2ccd941
Update User Guide
szelongq Sep 18, 2021
803f2f8
Change to using gradle v6.2 instead of v6.3
szelongq Sep 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Implement Enums for Task Types
szelongq committed Aug 18, 2021
commit d86c5b7f86f1ac92781a9ee084f9cc1e46100d7d
2 changes: 1 addition & 1 deletion src/main/java/Deadline.java
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ public class Deadline extends Task{
private String taskDate;

public Deadline(String taskName, String taskDate, boolean isDone) {
super(taskName, "Deadline", false);
super(taskName, TaskType.DEADLINE, false);
this.taskDate = taskDate;
}

14 changes: 7 additions & 7 deletions src/main/java/Duke.java
Original file line number Diff line number Diff line change
@@ -43,15 +43,15 @@ public static void main(String[] args) throws DukeException {
break;

case "todo":
createNewTask(userInputScanner, "ToDo");
createNewTask(userInputScanner, TaskType.TODO);
break;

case "deadline":
createNewTask(userInputScanner, "Deadline");
createNewTask(userInputScanner, TaskType.DEADLINE);
break;

case "event":
createNewTask(userInputScanner, "Event");
createNewTask(userInputScanner, TaskType.EVENT);
break;

case "delete":
@@ -82,16 +82,16 @@ private static void completeTask(int taskNum) {
System.out.printf("\t\t%s\n", tasks.get(taskNum - 1));
}

private static void createNewTask(Scanner userInputScanner, String taskType)
private static void createNewTask(Scanner userInputScanner, TaskType taskType)
throws MissingInputException {
if (!userInputScanner.hasNext())
throw new MissingInputException();
else if (taskType.equalsIgnoreCase("ToDo")) {
throw new MissingInputException(taskType);
else if (taskType == TaskType.TODO) {
Task newTask = new ToDo(userInputScanner.nextLine());
addNewTask(newTask);
}
else {
if (taskType.equalsIgnoreCase("Deadline"))
if (taskType == TaskType.DEADLINE)
userInputScanner.useDelimiter(" /by ");
else
userInputScanner.useDelimiter(" /at ");
2 changes: 1 addition & 1 deletion src/main/java/Event.java
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ public class Event extends Task{
private String taskDate;

public Event(String taskName, String taskDate, boolean isDone) {
super(taskName, "Event", false);
super(taskName, TaskType.EVENT, false);
this.taskDate = taskDate;
}

4 changes: 2 additions & 2 deletions src/main/java/MissingInputException.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
public class MissingInputException extends DukeException {
public MissingInputException() {
super("Missing input for this operation");
public MissingInputException(TaskType taskType) {
super("The description for " + taskType + " cannot be empty");
}
}
8 changes: 5 additions & 3 deletions src/main/java/Task.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
public class Task {
private String taskName;
private String taskType;
private TaskType taskType;
private boolean isDone;

public Task(String taskName, String taskType, boolean isDone) {
public Task(String taskName, TaskType taskType, boolean isDone) {
this.taskName = taskName;
this.taskType = taskType;
this.isDone = isDone;
}

public Task(String taskName, String taskType) {
public Task(String taskName, TaskType taskType) {
this(taskName, taskType, false);
}

@@ -35,3 +35,5 @@ public String toString() {
return String.format("[%s] %s", checked, taskName);
}
}

;
3 changes: 3 additions & 0 deletions src/main/java/TaskType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public enum TaskType {
TODO, DEADLINE, EVENT
}
2 changes: 1 addition & 1 deletion src/main/java/ToDo.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
public class ToDo extends Task{
public ToDo(String taskName, boolean isDone) {
super(taskName, "ToDo", false);
super(taskName, TaskType.TODO, false);
}

public ToDo(String taskName) {
2 changes: 1 addition & 1 deletion text-ui-test/EXPECTED.TXT
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ Duke:

User:
Duke:
Error: Missing input for this operation.
Error: The description for TODO cannot be empty.

User:
Duke: